Get season count

All about user-defined episode / movie / file name format expressions
Post Reply
joshua
Posts: 12
Joined: 14 Dec 2013, 14:26

Get season count

Post by joshua »

Hi,

How do i get the season count from TheTVBD ? I can't find how to do it. :(

Or how do i get the last season number ? I want to write a "Final season" tag on the directory if the serie is "Ended/Cancelled" and i'm renaming the last season.

Like this :
The Unit - Season 01 (2006)
The Unit - Season 02 (2006-2007)
The Unit - Season 03 (2007)
The Unit - Season 04 (Final) (2008-2009)
Thanks!

J

Edit : Note : I think i've posted that in the wrong forum.. is there any way to move that to the Help section?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Get season count

Post by rednoah »

Easy.

Code: Select all

{episodelist.season.max()}
:idea: Please read the FAQ and How to Request Help.
joshua
Posts: 12
Joined: 14 Dec 2013, 14:26

Re: Get season count

Post by joshua »

Thanks !

But, is there a place that list all those functions?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Get season count

Post by rednoah »

It's all Groovy:
http://groovy.codehaus.org/JN1015-Collections

Predefined bindings and functions specific to FileBot format expressions are on the website with plenty of examples in the forums.
:idea: Please read the FAQ and How to Request Help.
Post Reply