Page 1 of 1

Need season interval

Posted: 22 Jan 2012, 14:15
by pr1nc1p3
Can I do this with actual regular expression funcionality? We maybe would need/create a tag like "seasonairdate" for archive shows:

Expression ---> Result

"\Season {s} ({seasonairdate})\" ---> "Season 4 (2010-2011)"


First year is date of first episode and second is the last episode of the season.


Lot of thanks!! Filebot is the best!!!

Re: Need season interval

Posted: 22 Jan 2012, 14:58
by rednoah
Sorry, that info so not available in the context of an episode expression. Don't really plan on supporting something like that now.

When I get back from my holiday I'll see if I can write you an expression hooking into Filebot internals. That should work just like localised titles long before it was actually supported.

Re: Need season interval

Posted: 09 Feb 2012, 12:37
by rednoah
I'm not adding that as an official binding but here is how it works:

Code: Select all

{def tvdb = net.sourceforge.filebot.WebServices.TheTVDB; def y = tvdb.getEpisodeList(tvdb.search(n)[0], Locale.ENGLISH).findAll{it.season == s}.airdate.year; y.min() + '-' + y.max()}

Re: Need season interval

Posted: 04 Mar 2012, 04:30
by rednoah
This simplified expression works in newer versions:

Code: Select all

{episodelist.findAll{it.season == s}.airdate.year[0,-1].join('-')}

Re: Need season interval

Posted: 28 Aug 2012, 10:04
by pr1nc1p3
Lot of thanks!!!!