[SNIPPET] Season Year(s)

All about user-defined episode / movie / file name format expressions
Post Reply
User avatar
rednoah
The Source
Posts: 23931
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

[SNIPPET] Season Year(s)

Post by rednoah »

Here's an expression that'll get you the season year(s) of the episode in question. The season year(s) may either be a year (e.g. 2000) or an interval (e.g. 2000-2002) depending on over what period of time the season was originally aired.




Option 1: Use Episode Release Year:

Format: Select all

{ d.year }
Option 2: Use Season Intervals (when seasons stretch across multiple years):

Format: Select all

{ episodelist.findAll{ it.s == s }.d.year.bounds().join('-') }
EDIT: FileBot r4096 introduces the season years {sy} binding:

Format: Select all

{ sy.join('-') }
Screenshot




Similarly you can get Total Season Count like this:

Format: Select all

{ episodelist.s.max() }
EDIT: FileBot r4097 introduces the season count {sc} binding:

Format: Select all

{ sc }
:idea: Please read the FAQ and How to Request Help.
Post Reply