ajout XZUID dans genre + "ID&Nom" pour copie youtube (anti bug _)
This commit is contained in:
parent
57db5b6104
commit
7a9542f6d6
|
@ -41,6 +41,7 @@ haut=$((height-200))
|
||||||
########################################################################
|
########################################################################
|
||||||
IPFSNODEID=$(ipfs id -f='<id>\n')
|
IPFSNODEID=$(ipfs id -f='<id>\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/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"
|
zenity --warning --width 300 --text "Ajoutez une vidéo à ASTROPORT/KODI"
|
||||||
|
|
||||||
|
@ -70,15 +71,15 @@ mkdir -p ${YTEMP}
|
||||||
echo "VIDEO $YTURL"
|
echo "VIDEO $YTURL"
|
||||||
/usr/local/bin/youtube-dl -f '[height=720]/best' \
|
/usr/local/bin/youtube-dl -f '[height=720]/best' \
|
||||||
--write-info-json --write-annotations \
|
--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.
|
# Get filename, extract ID, make destination dir and move copy.
|
||||||
YFILE=$(ls -t ${YTEMP} | head -n 1)
|
YFILE=$(ls -t ${YTEMP} | head -n 1)
|
||||||
FILE_NAME="$(basename "${YFILE}")"
|
FILE_NAME="$(basename "${YFILE}")"
|
||||||
FILE_EXT="${FILE_NAME##*.}"
|
FILE_EXT="${FILE_NAME##*.}"
|
||||||
|
|
||||||
YID=$(echo "${FILE_NAME}" | cut -d "_" -f 1)
|
YID=$(echo "${FILE_NAME}" | cut -d "&" -f 1)
|
||||||
YNAME=$(echo "${FILE_NAME}" | cut -d "_" -f 2-)
|
YNAME=$(echo "${FILE_NAME}" | cut -d "&" -f 2-)
|
||||||
TMDB="${YID}"
|
TMDB="${YID}"
|
||||||
|
|
||||||
FILE_PATH="$HOME/astroport/youtube/$YID"
|
FILE_PATH="$HOME/astroport/youtube/$YID"
|
||||||
|
@ -129,7 +130,7 @@ fi
|
||||||
/usr/local/bin/youtube-dl --default-search ytsearch1: \
|
/usr/local/bin/youtube-dl --default-search ytsearch1: \
|
||||||
--ignore-errors --no-mtime \
|
--ignore-errors --no-mtime \
|
||||||
--embed-thumbnail --metadata-from-title "%(artist)s - %(title)s" --add-metadata \
|
--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}
|
ls ${YTEMP}
|
||||||
# Get filename, extract ID, make destination dir and move copy.
|
# 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_NAME="$(basename "${YFILE}")"
|
||||||
FILE_EXT="${FILE_NAME##*.}"
|
FILE_EXT="${FILE_NAME##*.}"
|
||||||
|
|
||||||
YID=$(echo "${FILE_NAME}" | cut -d "_" -f 1)
|
YID=$(echo "${FILE_NAME}" | cut -d "&" -f 1)
|
||||||
YNAME=$(echo "${FILE_NAME}" | cut -d "_" -f 2-)
|
YNAME=$(echo "${FILE_NAME}" | cut -d "&" -f 2-)
|
||||||
|
|
||||||
[[ ! $islink && "$song" != "" ]] && FILE_PATH="$HOME/astroport/$CAT/$artist/_o-o_" \
|
[[ ! $islink && "$song" != "" ]] && FILE_PATH="$HOME/astroport/$CAT/$artist/_o-o_" \
|
||||||
|| FILE_PATH="$HOME/astroport/$CAT/${YID}"
|
|| FILE_PATH="$HOME/astroport/$CAT/${YID}"
|
||||||
|
|
Loading…
Reference in New Issue