From 6c98767e6dd69147c649dbb4549e53478c253329 Mon Sep 17 00:00:00 2001 From: qo-op Date: Thu, 4 Mar 2021 20:44:28 +0100 Subject: [PATCH] fingerprint IPFSREPFILEID. TODO: cut file if too long !! --- zen/new_mp3_in_astroport.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/zen/new_mp3_in_astroport.sh b/zen/new_mp3_in_astroport.sh index 69bd388..03f2dea 100755 --- a/zen/new_mp3_in_astroport.sh +++ b/zen/new_mp3_in_astroport.sh @@ -126,9 +126,9 @@ IPNS=$(ipfs name publish --quieter --key="${INDEXPREFIX}${REFERENCE}" $NEWIPFS) ## CHECK CONFIANCE and decide to fingerprint if (( $(echo "$CONFIANCE < 0.9" | bc -l) )); then - # 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}\"}") - echo "NEWCOG" | jq + # 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\":\"${IPFSREPFILEID}\",\"extension\":\".mp3\",\"song\":\"${IPNS}\"}") + echo "$NEWCOG" | jq fi # MEMORIZE NEW PIN @@ -142,5 +142,7 @@ touch ~/.zen/ipfs/.${IPFSNODEID}/PIN/${IPFSREPFILEID}/${G1PUB} ######################################################################## rm -Rf ${YTEMP} +echo "NEW ($file) ADDED." +echo "IPNS LINK : http://127.0.0.1:8181/ipns/$KEY/$G1PUB/" exit 0