mirror of
https://github.com/Jonny007-MKD/OTR-SaneRename
synced 2025-01-22 08:49:48 +01:00
Remove the series titlefrom the episode title right at the beginning (before the further checks)
This commit is contained in:
parent
c566b506ef
commit
c4dfc4212e
1 changed files with 1 additions and 7 deletions
|
@ -243,6 +243,7 @@ function funcGetEPG {
|
||||||
# Get the title of the episode from description in EPG using $1 as delimiter to the real description
|
# Get the title of the episode from description in EPG using $1 as delimiter to the real description
|
||||||
function funcGetEpgEpisodeTitle {
|
function funcGetEpgEpisodeTitle {
|
||||||
episode_title="${epg_text%%$1*}" # Text begins with episode title, cut off the rest
|
episode_title="${epg_text%%$1*}" # Text begins with episode title, cut off the rest
|
||||||
|
episode_title="$(echo ${episode_title#$series_title} | sed -e 's/^[^a-zA-Z0-9]*//' -e 's/ *$//')" # Get the title without the series title
|
||||||
if [ -z "$episode_title" ]; then
|
if [ -z "$episode_title" ]; then
|
||||||
eecho -e " EPG:\tNo Episode title found"
|
eecho -e " EPG:\tNo Episode title found"
|
||||||
else
|
else
|
||||||
|
@ -292,13 +293,6 @@ function funcGetEpisodeInfo {
|
||||||
eecho -e " \tEpisode title:\t$title"
|
eecho -e " \tEpisode title:\t$title"
|
||||||
episode_info=$(grep "sodeName>$title" "$wget_file" -B 10) # Get XML data of episode
|
episode_info=$(grep "sodeName>$title" "$wget_file" -B 10) # Get XML data of episode
|
||||||
fi
|
fi
|
||||||
if [ -z "$episode_info" ]; then # If we have not found anything
|
|
||||||
title="$(echo ${episode_title#$series_title } | sed -e 's/^ *//' -e 's/ *$//')" # Get the title without the series title
|
|
||||||
if [ "$title" != "$episode_title" ]; then
|
|
||||||
eecho -e " \tEpisode title:\t$title"
|
|
||||||
episode_info=$(grep "sodeName>$title" "$wget_file" -B 10) # Get XML data of episode
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$episode_info" ]; then # If we have found something
|
if [ -n "$episode_info" ]; then # If we have found something
|
||||||
episode_number=$(echo -e "$episode_info" | grep -m 1 "Combined_episodenumber") # Get episode number
|
episode_number=$(echo -e "$episode_info" | grep -m 1 "Combined_episodenumber") # Get episode number
|
||||||
|
|
Loading…
Reference in a new issue