Page 1 of 1

Help with adding season year to folder name

Posted: 02 Jul 2012, 15:26
by ga8orfan13
I am trying to find a good way to define location/filename in the following manner. I am having difficulty adding the season year when the episodes span multiple years.

Example:
- I have Season 1 and 2 of CHiPs
- I would like to have the files named like this...
\TV Shows\CHiPs\Season 01 (1977-1978)\S01E01.Pilot (1977-09-15).avi
.
.
.
\TV Shows\CHiPs\Season 01 (1977-1978)\S01E13.One Two Many (1978-01-05).avi

If the season spans only one year, then I can use an expression like this and it will work.
\TV Shows\{n}\Season {s.pad(2)} ({airdate.year})\{S00E00}.{t} ({airdate})

Not sure how to solve my issue with representing the season year when the season spans multiple years.

Any suggestions?

Thanks!

Re: Help with adding season year to folder name

Posted: 02 Jul 2012, 21:41
by rednoah
That came up sometime ago. There is a solution using the {episodelist} (?) binding somewhere here in this forum.

Re: Help with adding season year to folder name

Posted: 03 Jul 2012, 14:25
by rednoah
Here is the original thread:
http://filebot.sourceforge.net/forums/v ... p?f=4&t=58

This expression will get you the season year(s):

Code: Select all

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

Re: Help with adding season year to folder name

Posted: 22 Jul 2016, 14:17
by rednoah
FileBot r4096 introduces the season years {sy} binding.