get cookies from default browser USER to PLAYER
This commit is contained in:
parent
b9725b49df
commit
db72246364
|
@ -117,10 +117,12 @@ if [[ ! ${TIDDLER} ]]; then
|
|||
|
||||
#############################################################################
|
||||
## COPY FROM YOUTUBE (TODO DOUBLE COPY & MKV to MP4 OPTIMISATION)
|
||||
BROWSER=$(xdg-settings get default-web-browser | cut -d '.' -f 1 | cut -d '-' -f 1) ## GET cookies-from-browser
|
||||
## EXTRA PARAM TO TRY
|
||||
# --cookies-from-browser browser (xdg-settings get default-web-browser) allow member copies
|
||||
# --dateafter DATE --download-archive myarchive.txt
|
||||
yt-dlp -f "(bv*[ext=mp4][height<=720]+ba/b[height<=720])" \
|
||||
--cookies-from-browser $BROWSER \
|
||||
--download-archive $HOME/.zen/.yt-dlp.list \
|
||||
-S "filesize:700M" --no-mtime --embed-thumbnail --add-metadata \
|
||||
--write-subs --write-auto-subs --sub-langs "fr, en, en-orig" --embed-subs \
|
||||
|
|
|
@ -45,7 +45,7 @@ for PLAYER in $(ls -t ~/.zen/game/players/); do
|
|||
|
||||
## MY PLAYER
|
||||
ipfs key export $G1PUB -o ~/.zen/tmp/${MOATS}/$PLAYER.key
|
||||
ipfs key import $PLAYER ~/.zen/tmp/${MOATS}/$PLAYER.key
|
||||
[[ ! $(ipfs key list -l | grep $PLAYER | cut -d ' ' -f1) ]] && ipfs key import $PLAYER ~/.zen/tmp/${MOATS}/$PLAYER.key
|
||||
rm -f ~/.zen/tmp/${MOATS}/$PLAYER.key
|
||||
|
||||
## REFRESH CACHE
|
||||
|
@ -57,11 +57,10 @@ isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(
|
|||
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
|
||||
|
||||
echo "Getting latest online TW..."
|
||||
YOU=$(ipfs swarm peers >/dev/null 2>&1 && echo "$USER" || ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
||||
LIBRA=$(head -n 2 ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | tail -n 1 | cut -d ' ' -f 2)
|
||||
echo "($YOU) /ipns/$ASTRONAUTENS $LIBRA"
|
||||
[[ $YOU ]] && ipfs --timeout 30s cat /ipns/$ASTRONAUTENS > ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/index.html \
|
||||
|| curl -m 30 -so ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/index.html "$LIBRA/ipns/$ASTRONAUTENS"
|
||||
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"
|
||||
|
||||
## PLAYER TW IS ONLINE ?
|
||||
if [ ! -s ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/index.html ]; then
|
||||
|
|
2
start.sh
2
start.sh
|
@ -140,7 +140,7 @@ select fav in "${choices[@]}"; do
|
|||
echo "Enter to continue. Ctrl+C to stop"
|
||||
read
|
||||
ipfs key rm $PLAYER; ipfs key rm $G1PUB;
|
||||
for voeu in $(ls ~/.zen/game/players/$PLAYER/voeux/); do
|
||||
for voeu in $(ls ~/.zen/game/players/$PLAYER/voeux/ 2>/dev/null); do
|
||||
ipfs key rm $voeu
|
||||
[[ $voeu != "" ]] && rm -Rf ~/.zen/game/world/$voeu
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue