Removing a double date in a TV title.

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
boe
Posts: 35
Joined: 12 Jun 2016, 15:59

Removing a double date in a TV title.

Post by boe »

Hello,

I use this code - G:/TVCurrent/{n.sortName('$2, $1')} ({y})/Season {s} ({episodelist.findAll{it.season == s}.airdate.year.min()})/{n} - {s00e00} - {t} {vf} it works for most shows but some shows have the date in the name. E.g. the 2015 TV series called the magicians. For shows Iike this, I get - Magicians (2015), The (2015) I'd like to get Magicians, The (2015). Is this possible without writing two different scripts depending on the show title?
User avatar
rednoah
The Source
Posts: 23052
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Removing a double date in a TV title.

Post by rednoah »

Here's how I'd do it:

Code: Select all

{n.replaceTrailingBrackets().sortName('$2, $1')} ({y})

Code: Select all

Season {s} ({sy[0]})
:idea: Please read the FAQ and How to Request Help.
boe
Posts: 35
Joined: 12 Jun 2016, 15:59

Re: Removing a double date in a TV title.

Post by boe »

Fantastic! Thanks
Post Reply