Part identifier

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
SuperDOS
Posts: 33
Joined: 20 Mar 2013, 23:34

Part identifier

Post by SuperDOS »

Hi,

I use this syntax for renaming my TV-shows seriesFormat=TV-Shows/{n}/{'s'+s.pad(2)}/{n} - {s.pad(2)}x{e.pad(2)} - {t.lowerTrail().replacePart(', Part $1')}
Does anyone knows how handle episodes that are named series - sxe - part x when using replacePart?
For example "The Pacific - 01x01 - Part One becomes "The Pacific - 01x01 - , Part One"
User avatar
rednoah
The Source
Posts: 18830
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Part identifier

Post by rednoah »

Bad side effect. You can do you're own replacement code or just check that the title doesn't start with Part before u use replacePart

You can do this to only replace numbers, but keep things as they are for non-number part identifiers (e.g. "One"):

Code: Select all

replacePart{g0, g1 -> g1 =~ /\d/ ? ', Part '+g1 : g0}
:idea: Please read the FAQ and How to Request Help.
SuperDOS
Posts: 33
Joined: 20 Mar 2013, 23:34

Re: Part identifier

Post by SuperDOS »

Nice!

Looks good now, thanks!
Post Reply