Skip to content

Commit

Permalink
fix issue with path that contains spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezequiel Bergamaschi committed May 17, 2016
1 parent 47fdb82 commit 38f774b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wanted/search-wanted.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 38f774b

Please sign in to comment.