From 6c5b55b1fe5db208a3c1ea99d43c73ff288589b1 Mon Sep 17 00:00:00 2001 From: fred Date: Sat, 29 Jun 2024 11:14:00 +0200 Subject: [PATCH] fixxxx --- RUNTIME/PLAYER.refresh.sh | 12 +++++++----- ajouter_media.sh | 4 ++-- tools/new_file_in_astroport.sh | 9 ++++++--- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/RUNTIME/PLAYER.refresh.sh b/RUNTIME/PLAYER.refresh.sh index 282ce6c7..009fb8b9 100755 --- a/RUNTIME/PLAYER.refresh.sh +++ b/RUNTIME/PLAYER.refresh.sh @@ -415,17 +415,19 @@ for PLAYER in ${PLAYERONE[@]}; do echo "${UPLAYERSTIDS[@]}" UPLAYERSTIDS_STR="" for item in "${UPLAYERSTIDS[@]}"; do - UPLAYERSTIDS_STR+=" * $item \n" + UPLAYERSTIDS_STR+=" - $item \n" done + ###################################### # (RE)MAKE "SECTORTW_NEWS" TIDDLER - cat ${MY_PATH}/../templates/data/SECTORTW_NEWS.json \ - | sed -e "s~_SECTOR_~${SECTOR}~g" \ + sed -E \ + -e "s~_SECTOR_~${SECTOR}~g" \ -e "s~_MOATS_~${MOATS}~g" \ -e "s~_UPLANET_~https://qo-op.com~g" \ - -z "s~_UPLAYERSTIDS_~${UPLAYERSTIDS_STR}~g" \ + -e "s~_UPLAYERSTIDS_~$(echo -n "$UPLAYERSTIDS_STR")~" \ -e "s~_SECTORTW_~${SECTORIPNS}/TW~g" \ - > ~/.zen/tmp/${MOATS}/SECTORTW_NEWS.json + ${MY_PATH}/../templates/data/SECTORTW_NEWS.json > ~/.zen/tmp/${MOATS}/SECTORTW_NEWS.json + echo "SECTORTW_NEWS $SECTOR SECTORTW=${SECTORIPNS}/TW :: ~/.zen/tmp/${MOATS}/SECTORTW_NEWS.json" ${MY_PATH}/TW/delete_tiddler.sh \ diff --git a/ajouter_media.sh b/ajouter_media.sh index 330cc3fe..2c1d2ef0 100755 --- a/ajouter_media.sh +++ b/ajouter_media.sh @@ -777,7 +777,7 @@ mv ~/.zen/tmp/screen.png ~/Astroport/${PLAYER}/${CAT}/${MEDIAID}/screen.png ######################################################################## # ADD $FILE to IPFS / ASTROPORT / KODI -echo "(♥‿‿♥) new_file_in_astroport.sh \"$HOME/Astroport/${PLAYER}/${CAT}/${MEDIAID}/\" \"${FILE_NAME}\"" "$3" +echo "(♥‿‿♥) new_file_in_astroport.sh \"$HOME/Astroport/${PLAYER}/${CAT}/${MEDIAID}/\" \"${FILE_NAME}\"" "$3" "$PLAYER" [[ -f ~/Astroport/${PLAYER}/${CAT}/${MEDIAID}/ajouter_video.txt ]] && cat ~/Astroport/${PLAYER}/${CAT}/${MEDIAID}/ajouter_video.txt # LOG NOISE # [[ -f ~/Astroport/${PLAYER}/${CAT}/${MEDIAID}/video.json ]] && cat ~/Astroport/${PLAYER}/${CAT}/${MEDIAID}/video.json ######################################################################## @@ -808,7 +808,7 @@ if [[ ! -s ~/Astroport/${PLAYER}/${CAT}/${MEDIAID}/${MEDIAKEY}.dragdrop.json ]]; #else" >> ~/Astroport/${PLAYER}/Add_${MEDIAKEY}_script.sh # $3 is the G1PUB of the PLAYER - echo "${MY_PATH}/tools/new_file_in_astroport.sh \"$HOME/Astroport/${PLAYER}/${CAT}/${MEDIAID}/\" \"${FILE_NAME}\" \"$G1PUB\"" >> ~/Astroport/${PLAYER}/Add_${MEDIAKEY}_script.sh + echo "${MY_PATH}/tools/new_file_in_astroport.sh \"$HOME/Astroport/${PLAYER}/${CAT}/${MEDIAID}/\" \"${FILE_NAME}\" \"$G1PUB\" \"$PLAYER\"" >> ~/Astroport/${PLAYER}/Add_${MEDIAKEY}_script.sh #[[ $CHOICE == "TMDB" ]] && echo "fi" >> ~/Astroport/${PLAYER}/Add_${MEDIAKEY}_script.sh diff --git a/tools/new_file_in_astroport.sh b/tools/new_file_in_astroport.sh index 4834ca71..cc5012c0 100755 --- a/tools/new_file_in_astroport.sh +++ b/tools/new_file_in_astroport.sh @@ -9,6 +9,8 @@ ######## #### ### ## # start=`date +%s` +exec 2>&1 >> ~/.zen/tmp/ajouter_media.log + MY_PATH="`dirname \"$0\"`" # relative MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized . "$MY_PATH/my.sh" @@ -46,10 +48,11 @@ last_char=${path:length-1:1} file="$2" G1PUB="$3" +PLAYER="$4" ### ECHO COMMAND RECEIVED : echo "FOUNIR 'PATH' 'FILE' et 'G1PUB' du PLAYER inscrit sur la STATION" -echo "$MY_PATH/new_file_in_astroport.sh PATH/ \"$path\" FILE \"$file\" G1PUB \"$G1PUB\" " +echo "$MY_PATH/new_file_in_astroport.sh PATH/ \"$path\" FILE \"$file\" G1PUB \"$G1PUB\" PLAYER \"$PLAYER\" " ################################################ ## FILE ANALYSE & IDENTIFICATION TAGGINGS @@ -78,9 +81,9 @@ MIME=$(file --mime-type -b "${path}${file}") # GET CONNECTED PLAYER ######################################################################## [[ ! $G1PUB ]] && G1PUB=$(cat ~/.zen/game/players/.current/.g1pub 2>/dev/null) +[[ ! $PLAYER ]] && PLAYER=$(cat ~/.zen/game/players/.current/.player 2>/dev/null); -PLAYER=$(cat ~/.zen/game/players/.current/.player 2>/dev/null); -[[ ! $PLAYER ]] && echo "(╥☁╥ ) No current player. Please Login" && exit 1 +[[ ! $PLAYER ]] && echo "(╥☁╥ ) No player. Please Login" && exit 1 # NOT CURRENT PLAYER (CHECK FOR TW & KEY [[ $(ipfs key list -l | grep -w $G1PUB) ]] \