Help With Combined Episode Naming for PLEX
Posted: 07 Jan 2016, 02:28
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.
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.