Page 1 of 1

Help With Combined Episode Naming for PLEX

Posted: 07 Jan 2016, 02:28
by ScottGrimes
Hi,

First post to this forum and newbie to FileBot and its scripting. I'm hoping someone can point me in the right direction. I searched the forums and google and so far have not been able to find an answer... probably not asking the right questions.

I am using FileBot v4.6.1 and using the following script I came up with, it seems, for the most part, to work well naming TV episodes. It falls apart, somewhat, when trying to rename combined episodes of 3 or more. This does not happen very often at all, so I could override the naming with the F2 command. However, it would be nice to have a more elegant solution.

{n.replace(': ', ' - ')} {episode.special ? 's00e'+special.pad(2) : s00e00.lower()} - {t.replace(/[`´‘’?]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?!]/, "")}{if (ext == 'srt') '.eng'}

The Walking Dead s01e01-e03

becomes

The Walking Dead s01e01-e02-e03 - Days Gone Bye & Guts & Tell It to the Frogs

Which looks ok to me. However, PLEX does not understand 's01e01-e02-e03'. It treats the episode as only two episodes and not 3. I also tried removing the dashes and still no joy. If I manually rename it to:

The Walking Dead s01e01-e03 - Days Gone Bye & Guts & Tell It to the Frogs - all works great.

Is there a way to display the first and last episode number 's01e01-e03' instead?

Also, if the combined episode is a special, like the following:

The Walking Dead s00e03-e08

It only lists the first episode number, but does retrieve the episode titles... so I'm missing something here as well.

The Walking Dead s00e03 - Torn Apart (1) A New Day & Torn Apart (2) Family Matters & Torn Apart (3) Domestic Violence & Torn Apart (4) Neighborly Advice & Torn Apart (5) Step

Hoping all this can be done in one script.

Thanks in advance for any help.

Re: Help With Combined Episode Naming for PLEX

Posted: 07 Jan 2016, 09:03
by rednoah
This kind of range-type multi-episode naming scheme seems to be somewhat new. I've updated {s00e00} and {sxe} to use the new standard.

Fixed with r3415.

Re: Help With Combined Episode Naming for PLEX

Posted: 07 Jan 2016, 17:51
by ScottGrimes
Thanks for the quick reply. Looks like we are on the right path. However, it is inserting an extra 'x' character before the episode numbering using the same script above. Is this something to distinguish combined episode names. I'll check to see if PLEX understands this.

Burn Notice s06e11-e12 - Desperate Measures & Means & Ends

is changed to:

Burn Notice s06xe11-e12 - Desperate Measures & Means & Ends

and for specials:

The Walking Dead s00e03-e08 - Torn Apart (1) A New Day & Torn Apart (2) Family Matters & Torn Apart (3) Domestic Violence & Torn Apart (4) Neighborly Advice & Torn Apart (5) Step

is changed to:

The Walking Dead s00xe03-e08 - Torn Apart (1) A New Day & Torn Apart (2) Family Matters & Torn Apart (3) Domestic Violence & Torn Apart (4) Neighborly Advice & Torn Apart (5) Step

Thanks.

Re: Help With Combined Episode Naming for PLEX

Posted: 07 Jan 2016, 18:31
by rednoah
Fixed it r3418.

Re: Help With Combined Episode Naming for PLEX

Posted: 07 Jan 2016, 19:03
by ScottGrimes
Works Perfectly. Thanks!