Hi,
I am having a problem with Special Episodes and the thetvdb as they always seem to be have the {s} attribute set to 0, despite having the field "Airs after Season" on the thetvdb set to a correct value.
E.g.
A file named "Doctor Who (2005) Special 142" will resolve to
Season 00/Doctor Who (2005) - Special 142 - Last Christmas
using the Naming Format
Season {s.pad(2)}/{n} - {episode.special ? 'Special '+special.pad(2) : s00e00} - {t}
I would expect (and hope for) it to be sorted into Season 08 since that particular episode has the field set. See http://thetvdb.com/index.php?tab=episod ... id=5050459
Special Epsiode Seasons in thetvdb
Re: Special Epsiode Seasons in thetvdb
Currently {s} will be airsbefore_season if available, or 0 if undefined. Originally there was no airsafter_season but now that there is, which one would make the most sense?
Re: Special Epsiode Seasons in thetvdb
How about a double fallback?
pseudo-code:
I can't image that both values are set simultaneously for many episodes and even in that case such a solution would yield an acceptable result.
pseudo-code:
Code: Select all
if (not_undefined(airsbefore_season)) {
return airsbefore_season;
}
else if (not_undefined(airsafter_season)) {
return airsafter_season;
}
else {
return 0;
}
Re: Special Epsiode Seasons in thetvdb
I've already updated the code to do something like that.