forked from STI/Astroport.ONE
12x12 PLAYERS help PLAYERS
This commit is contained in:
parent
9166b3bc08
commit
5cccddbddf
|
@ -52,13 +52,21 @@ echo "DEBUG : cat ~/.zen/tmp/CopierYoutube.json | jq -r"
|
|||
## URL EXTRACTION & yt-dlp.cache.$PLAYER upgrade
|
||||
for YURL in $(cat ~/.zen/tmp/CopierYoutube.json | jq -r '.[].text' | grep 'http'); do
|
||||
echo "Detected $YURL"
|
||||
echo "Extracting video playlist"
|
||||
echo "Extracting video playlist into yt-dlp.cache.$PLAYER"
|
||||
|
||||
### yt-dlp.command
|
||||
[[ ! $(cat ~/.zen/tmp/$IPFSNODEID/yt-dlp.command 2>/dev/null | grep "$YURL") ]] \
|
||||
&& echo "$PLAYER&$YURL" >> ~/.zen/tmp/$IPFSNODEID/yt-dlp.command
|
||||
|
||||
yt-dlp --print "%(id)s&%(webpage_url)s" "${YURL}" >> ~/.zen/tmp/$IPFSNODEID/yt-dlp.cache.$PLAYER
|
||||
### yt-dlp.command
|
||||
CMD=$(cat ~/.zen/tmp/$IPFSNODEID/yt-dlp.command 2>/dev/null | grep "$YURL" | tail -n 1)
|
||||
if [[ ! $CMD ]]; then
|
||||
echo "$PLAYER&$YURL:$MOATS" >> ~/.zen/tmp/$IPFSNODEID/yt-dlp.command
|
||||
else
|
||||
lastrun=$(echo "$CMD" | rev | cut -d ':' -f 1 | rev) && echo "$CMD"
|
||||
duree=$(expr ${MOATS} - $lastrun)
|
||||
[[ ! $lastrun ]] && echo "$PLAYER&$YURL:$MOATS" >> ~/.zen/tmp/$IPFSNODEID/yt-dlp.command && duree=604800000
|
||||
# ONE WEEK NEW SCAN
|
||||
if [[ duree -ge 604800000 ]]; then
|
||||
yt-dlp --print "%(id)s&%(webpage_url)s" "${YURL}" >> ~/.zen/tmp/$IPFSNODEID/yt-dlp.cache.$PLAYER
|
||||
fi
|
||||
fi
|
||||
|
||||
done # FINISH YURL loop
|
||||
|
||||
|
|
|
@ -62,9 +62,10 @@ isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(
|
|||
|
||||
echo "Getting latest online TW..."
|
||||
LIBRA=$(head -n 2 ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | tail -n 1 | cut -d ' ' -f 2)
|
||||
echo "/ipns/$ASTRONAUTENS on $LIBRA"
|
||||
echo "/ipns/$ASTRONAUTENS ON $LIBRA"
|
||||
ipfs --timeout 60s cat /ipns/$ASTRONAUTENS > ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/index.html \
|
||||
|| curl -m 30 -so ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/index.html "$LIBRA/ipns/$ASTRONAUTENS"
|
||||
|| curl -m 30 -so ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/index.html "$LIBRA/ipns/$ASTRONAUTENS" \
|
||||
|| cp ~/.zen/game/players/$PLAYER/ipfs/moa/index.html ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/index.html
|
||||
|
||||
## PLAYER TW IS ONLINE ?
|
||||
if [ ! -s ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/index.html ]; then
|
||||
|
|
Loading…
Reference in New Issue