mirror of
https://github.com/Jonny007-MKD/OTR-SaneRename
synced 2025-03-10 16:07:09 +01:00
Added comments for functions
This commit is contained in:
parent
e8e74d8e69
commit
e476d4d93d
1 changed files with 5 additions and 2 deletions
|
@ -180,6 +180,7 @@ function funcGetEpgEpisodeTitle {
|
||||||
eecho -e " EPG:\tEpisode title:\t$episode_title" # We found some title :)
|
eecho -e " EPG:\tEpisode title:\t$episode_title" # We found some title :)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Download episodes list from TvDB
|
||||||
function funcGetEpisodes {
|
function funcGetEpisodes {
|
||||||
# Download Episode list of series
|
# Download Episode list of series
|
||||||
episode_db="https://www.thetvdb.com/api/$apikey/series/$series_id/all/$lang.xml"
|
episode_db="https://www.thetvdb.com/api/$apikey/series/$series_id/all/$lang.xml"
|
||||||
|
@ -191,10 +192,11 @@ function funcGetEpisodes {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Get the information from episodes list of TvDB
|
||||||
function funcGetEpisodeInfo {
|
function funcGetEpisodeInfo {
|
||||||
while true; do
|
while true; do
|
||||||
episode_info=$(grep "Name>$episode_title" "$PwD/episodes.xml" -B 10) # Get XML data of episode
|
episode_info=$(grep "Name>$episode_title" "$PwD/episodes.xml" -B 10) # Get XML data of episode
|
||||||
if [ -z "$episode_info" ]; then # Nothing found. Shorten the title
|
if [ -z "$episode_info" ]; then # Nothing found. Shorten the title
|
||||||
tmp=${episode_title% *}
|
tmp=${episode_title% *}
|
||||||
if [ ${#episode_title} -le 4 ] || [ "$tmp" == "$episode_title" ]; then
|
if [ ${#episode_title} -le 4 ] || [ "$tmp" == "$episode_title" ]; then
|
||||||
break;
|
break;
|
||||||
|
@ -236,6 +238,7 @@ function funcGetEpisodeInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# This function does everything
|
||||||
function doIt {
|
function doIt {
|
||||||
funcHeader
|
funcHeader
|
||||||
|
|
||||||
|
@ -277,4 +280,4 @@ function doIt {
|
||||||
}
|
}
|
||||||
|
|
||||||
funcParam $@
|
funcParam $@
|
||||||
doIt
|
doIt
|
||||||
|
|
Loading…
Reference in a new issue