forked from axiom-team/astrXbian
fingerprint IPFSREPFILEID. TODO: cut file if too long !!
This commit is contained in:
parent
8e00fa276a
commit
6c98767e6d
|
@ -126,9 +126,9 @@ IPNS=$(ipfs name publish --quieter --key="${INDEXPREFIX}${REFERENCE}" $NEWIPFS)
|
||||||
|
|
||||||
## CHECK CONFIANCE and decide to fingerprint
|
## CHECK CONFIANCE and decide to fingerprint
|
||||||
if (( $(echo "$CONFIANCE < 0.9" | bc -l) )); then
|
if (( $(echo "$CONFIANCE < 0.9" | bc -l) )); then
|
||||||
# USE IPNS KEY for "song_name"
|
# fingerprint track & USE IPNS KEY for "song_name"
|
||||||
NEWCOG=$(curl -X POST "http://localhost:8600/api/v1/mazash/fingerprint" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"cid\":\"${SAMPLEID}\",\"extension\":\".mp3\",\"song\":\"${IPNS}\"}")
|
NEWCOG=$(curl -X POST "http://localhost:8600/api/v1/mazash/fingerprint" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"cid\":\"${IPFSREPFILEID}\",\"extension\":\".mp3\",\"song\":\"${IPNS}\"}")
|
||||||
echo "NEWCOG" | jq
|
echo "$NEWCOG" | jq
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# MEMORIZE NEW PIN
|
# MEMORIZE NEW PIN
|
||||||
|
@ -142,5 +142,7 @@ touch ~/.zen/ipfs/.${IPFSNODEID}/PIN/${IPFSREPFILEID}/${G1PUB}
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
rm -Rf ${YTEMP}
|
rm -Rf ${YTEMP}
|
||||||
|
echo "NEW ($file) ADDED."
|
||||||
|
echo "IPNS LINK : http://127.0.0.1:8181/ipns/$KEY/$G1PUB/"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue