From 7a9542f6d647a339fb51d18c899de28cd41f9178 Mon Sep 17 00:00:00 2001 From: qo-op Date: Tue, 9 Mar 2021 19:49:17 +0100 Subject: [PATCH] ajout XZUID dans genre + "ID&Nom" pour copie youtube (anti bug _) --- ajouter_video.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ajouter_video.sh b/ajouter_video.sh index e2fc0ee..3ae7202 100755 --- a/ajouter_video.sh +++ b/ajouter_video.sh @@ -41,6 +41,7 @@ haut=$((height-200)) ######################################################################## IPFSNODEID=$(ipfs id -f='\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) zenity --warning --width 300 --text "Ajoutez une vidéo à ASTROPORT/KODI" @@ -70,15 +71,15 @@ mkdir -p ${YTEMP} echo "VIDEO $YTURL" /usr/local/bin/youtube-dl -f '[height=720]/best' \ --write-info-json --write-annotations \ ---no-mtime -o "${YTEMP}/%(id)s_%(title)s.%(ext)s" $YTURL +--no-mtime -o "${YTEMP}/%(id)s&%(title)s.%(ext)s" $YTURL # Get filename, extract ID, make destination dir and move copy. YFILE=$(ls -t ${YTEMP} | head -n 1) FILE_NAME="$(basename "${YFILE}")" FILE_EXT="${FILE_NAME##*.}" -YID=$(echo "${FILE_NAME}" | cut -d "_" -f 1) -YNAME=$(echo "${FILE_NAME}" | cut -d "_" -f 2-) +YID=$(echo "${FILE_NAME}" | cut -d "&" -f 1) +YNAME=$(echo "${FILE_NAME}" | cut -d "&" -f 2-) TMDB="${YID}" FILE_PATH="$HOME/astroport/youtube/$YID" @@ -129,7 +130,7 @@ fi /usr/local/bin/youtube-dl --default-search ytsearch1: \ --ignore-errors --no-mtime \ --embed-thumbnail --metadata-from-title "%(artist)s - %(title)s" --add-metadata \ ---extract-audio --audio-format mp3 -o "${YTEMP}/%(id)s_%(title)s.%(ext)s" "$artist $song" +--extract-audio --audio-format mp3 -o "${YTEMP}/%(id)s&%(title)s.%(ext)s" "$artist $song" ls ${YTEMP} # Get filename, extract ID, make destination dir and move copy. @@ -137,8 +138,8 @@ YFILE=$(ls -t ${YTEMP} | head -n 1) FILE_NAME="$(basename "${YFILE}")" FILE_EXT="${FILE_NAME##*.}" -YID=$(echo "${FILE_NAME}" | cut -d "_" -f 1) -YNAME=$(echo "${FILE_NAME}" | cut -d "_" -f 2-) +YID=$(echo "${FILE_NAME}" | cut -d "&" -f 1) +YNAME=$(echo "${FILE_NAME}" | cut -d "&" -f 2-) [[ ! $islink && "$song" != "" ]] && FILE_PATH="$HOME/astroport/$CAT/$artist/_o-o_" \ || FILE_PATH="$HOME/astroport/$CAT/${YID}"