From 8c2be5f75a60989b621d29039d881fa00be320f5 Mon Sep 17 00:00:00 2001 From: qo-op Date: Thu, 1 Apr 2021 01:49:24 +0200 Subject: [PATCH] remove () ' " from YNAME --- ajouter_video.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ajouter_video.sh b/ajouter_video.sh index 11f531c..72417a9 100755 --- a/ajouter_video.sh +++ b/ajouter_video.sh @@ -79,7 +79,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") # Remove YoutubeID_ and (what is in perentheses) +YNAME=$(echo "${FILE_NAME}" | cut -d "&" -f 2- | sed "s/[(][^)]*[)]//g" | sed "s/'/ /g" | sed "s/\"/ /g" | sed "s/&/ /g" ) # Remove YoutubeID_ and (what is in perentheses) TMDB="${YID}" FILE_PATH="$HOME/astroport/youtube/$YID" @@ -144,7 +144,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") # Remove YoutubeID_ and (what is in perentheses) +YNAME=$(echo "${FILE_NAME}" | cut -d "&" -f 2- | sed "s/[(][^)]*[)]//g" | sed "s/'/ /g" | sed "s/\"/ /g" | sed "s/&/ /g" ) # Remove YoutubeID_ and (what is in perentheses) [[ ! $islink && "$song" != "" ]] && FILE_PATH="$HOME/astroport/$CAT/$artist/_o-o_" \ || FILE_PATH="$HOME/astroport/$CAT/${YID}"