From 696a82f3db554a8b64060fa40308d06b32b56d35 Mon Sep 17 00:00:00 2001 From: qo-op Date: Fri, 2 Apr 2021 19:47:47 +0200 Subject: [PATCH] echo "${FILE_NAME}" | detox --inline --- ajouter_video.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ajouter_video.sh b/ajouter_video.sh index c755f19..7977e7a 100755 --- a/ajouter_video.sh +++ b/ajouter_video.sh @@ -81,7 +81,8 @@ 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 "s/;/ /g" |sed "s/'/ /g" | sed "s/\"/ /g" | sed "s/&/ /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' ) # Remove YoutubeID_ and (what is in perentheses) +[[ $(which detox) ]] && YNAME=$(echo "${FILE_NAME}" | detox --inline) TMDB="${YID}" FILE_PATH="$HOME/astroport/youtube/$YID" @@ -146,7 +147,8 @@ 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 "s/;/ /g" |sed "s/'/ /g" | sed "s/\"/ /g" | sed "s/&/ /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' ) # 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_" \ || FILE_PATH="$HOME/astroport/$CAT/${YID}"