detox TITLE & YNAME

This commit is contained in:
qo-op 2021-04-02 19:53:32 +02:00
parent df22d98e26
commit 710148c051
1 changed files with 4 additions and 3 deletions

View File

@ -81,7 +81,7 @@ FILE_NAME="$(basename "${YFILE}")"
FILE_EXT="${FILE_NAME##*.}"
YID=$(echo "${FILE_NAME}" | cut -d "&" -f 1)
YNAME=$(echo "${FILE_NAME}" | cut -d "&" -f 2- | sed "s/[(][^)]*[)]//g" | sed -e 's/[^A-Za-z0-9._-]/_/g' ) # Remove YoutubeID_ and (what is in perentheses)
YNAME=$(echo "${FILE_NAME}" | cut -d "&" -f 2- | sed "s/[(][^)]*[)]//g" | sed -e 's/[^A-Za-z0-9._-]/_/g' | sed -e 's/__/_/g' ) # Remove YoutubeID_ and (what is in perentheses)
[[ $(which detox) ]] && YNAME=$(echo "${FILE_NAME}" | detox --inline)
TMDB="${YID}"
@ -147,7 +147,7 @@ FILE_NAME="$(basename "${YFILE}")"
FILE_EXT="${FILE_NAME##*.}"
YID=$(echo "${FILE_NAME}" | cut -d "&" -f 1)
YNAME=$(echo "${FILE_NAME}" | cut -d "&" -f 2- | sed "s/[(][^)]*[)]//g" | sed -e 's/[^A-Za-z0-9._-]/_/g' ) # Remove YoutubeID_ and (what is in perentheses)
YNAME=$(echo "${FILE_NAME}" | cut -d "&" -f 2- | sed "s/[(][^)]*[)]//g" | sed -e 's/[^A-Za-z0-9._-]/_/g' | sed -e 's/__/_/g') # Remove YoutubeID_ and (what is in perentheses)
[[ $(which detox) ]] && YNAME=$(echo "${FILE_NAME}" | detox --inline)
[[ ! $islink && "$song" != "" ]] && FILE_PATH="$HOME/astroport/$CAT/$artist/_o-o_" \
@ -204,7 +204,8 @@ fi
# VIDEO TITLE
TITLE=$(zenity --entry --width 300 --title "Titre" --text "Indiquez le titre de la vidéo" --entry-text="${FILE_TITLE}")
[[ $TITLE == "" ]] && exit 1
TITLE=$(echo "${TITLE}" | sed "s/[(][^)]*[)]//g" | sed "s/;/ /g" |sed "s/'/ /g" | sed "s/\"/ /g" | sed "s/&/ /g" ) # Clean TITLE
TITLE=$(echo "${TITLE}" | sed "s/[(][^)]*[)]//g" | sed -e 's/[^A-Za-z0-9._-]/_/g' | sed -e 's/__/_/g' ) # Clean TITLE
[[ $(which detox) ]] && TITLE=$(echo "${TITLE}" | detox --inline)
# VIDEO YEAR
YEAR=$(zenity --entry --width 300 --title "Année" --text "Indiquez année de la vidéo. Exemple: 1985" --entry-text="")