diff --git a/ASTROBOT/G1Kodi.sh b/ASTROBOT/G1Kodi.sh index 423a8ab0..f4955e79 100755 --- a/ASTROBOT/G1Kodi.sh +++ b/ASTROBOT/G1Kodi.sh @@ -74,6 +74,13 @@ tiddlywiki --load ${INDEX} \ [[ $(cat ~/.zen/game/players/${PLAYER}/G1Kodi/TWmovies.json) == "[]" ]] && echo "AUCUN FILM G1KODI" +## TW G1Kodi RESET CODE +#~ tiddlywiki --load ${INDEX} \ + #~ --deletetiddlers '[tag[G1Kodi]]' \ + #~ --output ~/.zen/tmp/${MOATS} --render "$:/core/save/all" "cleanindex.html" "text/plain" +#~ [[ -s ~/.zen/tmp/${MOATS}/cleanindex.html ]] && cp -f ~/.zen/tmp/${MOATS}/cleanindex.html ~/.zen/tmp/${MOATS}/index.html + + echo "=========== ( ◕‿◕) (◕‿◕ ) ==============" ## EXTRACT MOVIE FILES LIST TO CSV @@ -124,23 +131,31 @@ while read TITRE; do --render '.' "${TITLE}.dragdrop.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' "'"Kodi_${TITLE}"'" fi ## CHECK PLAYER G1KODI CACHE. QUICKER. - # MAKE PAYMENT QRCODE - THASH=$(echo "Kodi_${TITLE}" | sha256sum | cut -d ' ' -f 1) if [[ $(cat ~/.zen/game/players/${PLAYER}/G1Kodi/${TITLE}.dragdrop.json) == "[]" ]]; then echo "NOT IN TW either IN CACHE" - if [[ $MIME == "video/mp4" ]]; then echo "$MIME. GOOD. RECORDING TO TW" + # MAKE PAYMENT QRCODE + # sha256 Kodi_TITLE + G1PUB encrypt = comment + THASH=$(echo "Kodi_${TITLE}" | sha256sum | cut -d ' ' -f 1) && echo ${THASH} > ~/.zen/tmp/${MOATS}/thash + ~/.zen/Astroport.ONE/tools/natools.py encrypt -p ${G1PUB} -i ~/.zen/tmp/${MOATS}/thash -o ~/.zen/tmp/${MOATS}/thash.enc + THASHSEC=$(cat ~/.zen/tmp/${MOATS}/thash.enc | base16) + + ## CREATE june:// QRCODE + amzqr "june://${G1PUB}?comment=G1KODI:${THASHSEC}&" -l H -c -p ${MY_PATH}/../images/TV.png -n VOD.png -d ~/.zen/tmp/${MOATS}/ + PV=$(ipfs add -q ~/.zen/tmp/${MOATS}/VOD.png) + echo "VODQR = /ipfs/${PV}" echo "## Creation json tiddler" echo '[ { "text": "{{!!titre}} {{!!sub}} - +
Bande Annonce
+ {{!!desc}} ", "title": "'Kodi_${TITLE}'", @@ -187,7 +202,7 @@ while read TITRE; do else - echo "MOVIE NO COMPATIBLE. PLEASE CONVERT TO MP4" + echo "MOVIE NO COMPATIBLE. MUST BE CONVERTED TO MP4" fi diff --git a/images/TV.png b/images/TV.png new file mode 100644 index 00000000..ceba9fb2 Binary files /dev/null and b/images/TV.png differ diff --git a/tools/my.sh b/tools/my.sh index 77df1c72..4f748cd0 100755 --- a/tools/my.sh +++ b/tools/my.sh @@ -396,6 +396,10 @@ IPFSNODEID="$(myIpfsPeerId)" isLAN="$(isLan)" myIP="$(myIp)" # "127.0.0.1" +## PATCH +myIP=$(hostname -I | awk '{print $1}' | head -n 1) +isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/") + myASTROPORT="http://${myIP}:1234" myASTRONEF="http://${myIP}:1234" myAPI="http://${myIP}:5001"