Page 1 of 1

Year of the first episode of each season?

Posted: 15 Oct 2014, 08:24
by DevXen
I'm trying to organize my seasons by year. [1999] - Season 01, [2000] - Season 02, etc
and the problem with

Code: Select all

[$airdate.year]
is that it gets the airdate for the current episode
many episodes span between 2 years, which would put it in 2 different folders,

So is there a way to get the airdate of the first episode of each season. to solve this issue?


Thanks,
-Dev

Re: Year of the first episode of each season?

Posted: 15 Oct 2014, 09:10
by rednoah
This one is somewhere here in the forums, but coding it up is faster than search so here you go ;)

Season (Start) Year for each Episode:

Code: Select all

{episodelist.findAll{ it.season == s }.airdate.year.min()}

Re: Year of the first episode of each season?

Posted: 15 Oct 2014, 21:54
by DevXen
I got this working, Thank you for your help.