From 38f774b24947e4e54f4f808b0d95e7a58b71e5cb Mon Sep 17 00:00:00 2001 From: Ezequiel Bergamaschi Date: Tue, 17 May 2016 00:56:32 -0300 Subject: [PATCH] fix issue with path that contains spaces --- wanted/search-wanted.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wanted/search-wanted.sh b/wanted/search-wanted.sh index 4c9c0c4..e7dfd57 100755 --- a/wanted/search-wanted.sh +++ b/wanted/search-wanted.sh @@ -3,15 +3,18 @@ declare WANTED_FILE=`dirname $0`/subs.wanted declare MISSED="" +echo "###### Process started at: $(date) ######" while read -r line; do - MAP_ARRAY=($(echo "$line" | sed "s/:/ /g")) + IFS=':' + MAP_ARRAY=($(echo "$line")) SOURCE=${MAP_ARRAY[0]} SRT=${MAP_ARRAY[1]} LANG=`echo $SRT | sed -e "s/\.srt//g" -e "s/.*\(..\)/\1/"` echo "subliminal download -l $LANG $SOURCE" subliminal download -l $LANG $SOURCE if [[ ! -f $SRT ]]; then + IFS='' MISSED="$SOURCE:$SRT\n$MISSED" echo "Subtitle still not available" else