Year of the first episode of each season?

All about user-defined episode / movie / file name format expressions
Post Reply
DevXen
Power User
Posts: 164
Joined: 12 Oct 2014, 21:15

Year of the first episode of each season?

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Year of the first episode of each season?

Post 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()}
:idea: Please read the FAQ and How to Request Help.
DevXen
Power User
Posts: 164
Joined: 12 Oct 2014, 21:15

Re: Year of the first episode of each season?

Post by DevXen »

I got this working, Thank you for your help.
Post Reply