Page 1 of 1

Part identifier

Posted: 20 Mar 2013, 23:43
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"

Re: Part identifier

Posted: 21 Mar 2013, 02:13
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}

Re: Part identifier

Posted: 21 Mar 2013, 06:53
by SuperDOS
Nice!

Looks good now, thanks!