1
0
Fork 0
mirror of https://github.com/Jonny007-MKD/OTR-SaneRename synced 2024-09-11 03:10:57 +02:00

As we search 2 lines we should not except only 1 line

This commit is contained in:
Jonny007-MKD 2015-11-25 10:23:03 +01:00
parent 3678aaafc7
commit 757e29a76c

View file

@ -259,7 +259,7 @@ function funcGetSeriesIdFromTvdb {
if [ ${#tmp} -eq 0 ]; then # No series with this name found
if $debug; then echo -e "grep -Pzo --binary-files=text \"(?s)>$langCurrent</language>\n<SeriesName>\" \"$wget_file\")"; fi;
tmp="$(grep -Pzo --binary-files=text "(?s)>$langCurrent</language>\n<SeriesName>" "$wget_file")" # Let's get all series from the query
if [ $(echo "$tmp" | wc -l) -eq 1 ]; then # If we only found one series
if [ $(( $(echo "$tmp" | wc -l) / 2 )) -eq 1 ]; then # If we only found one series
if $debug; then echo -e "grep -Pzo --binary-files=text \"(?s)<Series>.*?$langCurrent</language>.*?</SeriesName>\" \"$wget_file\")"; fi;
tmp="$(grep -Pzo --binary-files=text "(?s)<Series>.*?$langCurrent</language>.*?</SeriesName>" "$wget_file")" # Lets use this one
else