mirror of
https://github.com/Jonny007-MKD/OTR-SaneRename
synced 2025-01-22 08:49:48 +01:00
Search the series description also. I hope this does not lead to false positives!
This commit is contained in:
parent
dc2e036036
commit
90208697d3
1 changed files with 20 additions and 8 deletions
|
@ -346,7 +346,11 @@ function funcGetEpisodeInfo {
|
||||||
wget_file="$PwD/episodes-${series_id}.xml"
|
wget_file="$PwD/episodes-${series_id}.xml"
|
||||||
while true; do
|
while true; do
|
||||||
episode_info=$(grep -i "sodeName>$title" "$wget_file" -B 10) # Get XML data of episode
|
episode_info=$(grep -i "sodeName>$title" "$wget_file" -B 10) # Get XML data of episode
|
||||||
if [ -z "$episode_info" ]; then # Nothing found. Shorten the title
|
if [ -z "$episode_info" ]; then # Nothing found. Search the description
|
||||||
|
if [ ${#title} -gt 10 ]; then # If title is long enough
|
||||||
|
episode_info=$(grep -i "verView>$title" "$wget_file" -B 16)
|
||||||
|
fi
|
||||||
|
if [ -z "$episode_info" ]; then # Still nothing found. Shorten the title
|
||||||
tmp=${title% *}
|
tmp=${title% *}
|
||||||
if [ ${#tmp} -le 4 ] || [ "$tmp" == "$title" ]; then
|
if [ ${#tmp} -le 4 ] || [ "$tmp" == "$title" ]; then
|
||||||
if $title1; then
|
if $title1; then
|
||||||
|
@ -356,6 +360,9 @@ function funcGetEpisodeInfo {
|
||||||
break;
|
break;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
fi
|
||||||
title="$(echo $tmp | sed -e 's/^[^a-zA-Z0-9]*//' -e 's/ *$//')" # Remove special characters
|
title="$(echo $tmp | sed -e 's/^[^a-zA-Z0-9]*//' -e 's/ *$//')" # Remove special characters
|
||||||
eecho -e " \tEpisode title:\t$title"
|
eecho -e " \tEpisode title:\t$title"
|
||||||
else
|
else
|
||||||
|
@ -368,6 +375,11 @@ function funcGetEpisodeInfo {
|
||||||
title="${episode_title#$tmp }" # Remove it from the title
|
title="${episode_title#$tmp }" # Remove it from the title
|
||||||
eecho -e " \tEpisode title:\t$title"
|
eecho -e " \tEpisode title:\t$title"
|
||||||
episode_info=$(grep -i "sodeName>$title" "$wget_file" -B 10) # Get XML data of episode
|
episode_info=$(grep -i "sodeName>$title" "$wget_file" -B 10) # Get XML data of episode
|
||||||
|
if [ -z "$episode_info" ]; then # Nothing found. Search the description
|
||||||
|
if [ ${#title} -gt 10 ]; then # If title is long enough
|
||||||
|
episode_info=$(grep -i "verView>$title" "$wget_file" -B 16)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$episode_info" ]; then # If we have found something
|
if [ -n "$episode_info" ]; then # If we have found something
|
||||||
|
|
Loading…
Reference in a new issue