1
0
Fork 0
mirror of https://github.com/Jonny007-MKD/OTR-SaneRename synced 2024-05-08 21:54:04 +02:00

Remove the series titlefrom the episode title right at the beginning (before the further checks)

This commit is contained in:
Jonny007-MKD 2014-08-18 23:10:43 +02:00
parent c566b506ef
commit c4dfc4212e

View file

@ -243,6 +243,7 @@ function funcGetEPG {
# Get the title of the episode from description in EPG using $1 as delimiter to the real description
function funcGetEpgEpisodeTitle {
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
eecho -e " EPG:\tNo Episode title found"
else
@ -292,13 +293,6 @@ function funcGetEpisodeInfo {
eecho -e " \tEpisode title:\t$title"
episode_info=$(grep "sodeName>$title" "$wget_file" -B 10) # Get XML data of episode
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
episode_number=$(echo -e "$episode_info" | grep -m 1 "Combined_episodenumber") # Get episode number