Browse Source

log and warn ~/.zen/PIN/${ipfsrepidfile}/IPNSLINK - activate PIN refresh (no index.html update !!)

pull/38/head
fred 2 months ago
parent
commit
110949861a
  1. 12
      ajouter_video.sh
  2. 5
      zen/new_file_in_astroport.sh

12
ajouter_video.sh

@ -21,6 +21,8 @@
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
ME="${0##*/}"
G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
########################################################################
[[ $(which ipfs) == "" ]] && echo "ERREUR! Installez ipfs" && echo "wget https://git.p2p.legal/axiom-team/astrXbian/raw/master/.install/ipfs_alone.sh -O /tmp/ipfs_install.sh && chmod +x /tmp/ipfs_install.sh && /tmp/ipfs_install.sh" && exit 1
[[ $(which zenity) == "" ]] && echo "ERREUR! Installez zenity" && echo "sudo apt install zenity" && exit 1
@ -51,8 +53,8 @@ haut=$((height-200))
########################################################################
IPFSNODEID=$(ipfs id -f='<id>\n')
[[ -f ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title ]] && XZUID="$(cat ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title)" || XZUID="$(cat /etc/hostname)"
[[ -f ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid ]] && AXID=$(cat ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid)
[[ -f ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title ]] && XGUID="$(cat ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title)" || XGUID="$(cat /etc/hostname)"
[[ -f ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid ]] && XZUID=$(cat ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid)
# zenity --warning --width 300 --text "Ajoutez un MEDIA dans ASTROPORT"
@ -160,7 +162,7 @@ MEDIAKEY="YOUTUBE_${MEDIAID}"
FALSE Humain \
FALSE Animal \
TRUE Eveil \
TRUE ${AXID// /-}) || GENRES="${AXID// /-}"
TRUE ${XZUID// /-}) || GENRES="${XZUID// /-}"
# FORMAT GENRES genre1|genre2|genre3
@ -289,7 +291,7 @@ mv "${FILE_PATH}/${FILE_NAME}" "${FILE_PATH}/${YNAME}" && FILE_NAME="${YNAME}"
MEDIAID="${YID}"
TITLE="${YNAME%.*}"
GENRES="[\"$AXID\"]"
GENRES="[\"$XZUID\"]"
GROUPES="_IPNSKEY_" # USE GROUPS TO RECORD IPNS MEDIAKEY
MEDIAKEY="MP3_$MEDIAID"
@ -398,7 +400,7 @@ FILM_GENRES=$(zenity --list --checklist --title="GENRE" --height=${haut}\
FALSE Telefilm\
FALSE Thriller\
FALSE Western\
TRUE ${AXID// /-})
TRUE ${XZUID// /-})
# FORMAT GENRES ["genre1","genre2"]
GENRES="[\"$(echo ${FILM_GENRES} | sed s/\|/\",\"/g)\"]"

5
zen/new_file_in_astroport.sh

@ -141,7 +141,7 @@ IPFSREPFILEID=$(echo $IPFS | cut -d ' ' -f 2)
IPFSID=$(echo $IPFS | cut -d ' ' -f 1)
[[ $IPFSREPFILEID == "" ]] && echo "ipfs add ERROR" && exit 1
echo "-----------------------------------------------------------------"
echo "IPFS $file DIRECTORY: ipfs ls /ipfs/$IPFSID"
echo "IPFS $file DIRECTORY: ipfs ls /ipfs/$IPFSREPFILEID"
echo "-----------------------------------------------------------------"
echo "New $TYPE INDEX ~/.zen/ipfs/.${IPFSNODEID}/astroport/kodi/vstream/${PREFIX}ASTRXBIAN "
@ -175,9 +175,9 @@ if [[ $KEY ]]; then
# > STARGATE 1 - 2 - 3 - 4 - 5 !!
################ ENCRYPT keystore/$KEYFILE
else
## OLD IPNS KEY
KEY=$(cat ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/.ipns.link)
KEYFILE=$(cat ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/.ipns.key.keystore_filename)
echo "## ALREADY EXISTING IPNS KEY $KEYFILE ($KEY)"
fi
[[ ! $KEY ]] && echo "FATAL ERROR" && exit 1
@ -256,6 +256,7 @@ echo "anonymous" > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/${PINnode
# MEMORIZE my PIN
mkdir -p ~/.zen/PIN/${IPFSREPFILEID}/
touch ~/.zen/PIN/${IPFSREPFILEID}/${G1PUB}
# echo "$(ipfs key list -l | grep ${MEDIAKEY} | cut -d ' ' -f 1)" > ~/.zen/PIN/${ipfsrepidfile}/IPNSLINK # NO!! Would let PINing nodes change index.html///
########################################################################
## encrypt links for myself

Loading…
Cancel
Save