Episode - Episode with Multi Part support

All about user-defined episode / movie / file name format expressions
Post Reply
cman
Posts: 4
Joined: 03 Dec 2016, 06:20

Episode - Episode with Multi Part support

Post by cman »

I have several episodes that contain several files per episode
SERIES S01E11 - Episode Name, Part 1
SERIES S01E11 - Episode Name, Part 2
These are not split in the TVDB and are only split with the file. I don't really want to try and combine these into one file, and ideally just want to be able to rename them as is.

When i try to use Filebot to rename these among moving into their appropriate folder, but i'm having trouble getting the "Part x" to work.

What i typically used is a modified from others here and shown below,
Z:/Media/TV Shows/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’?""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y})/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{norm(n) +' - '} {episode.special ? 'S00E'+special.pad(2) : s00e00} {' - '+ norm(t)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|special[ ._-]edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[.]/, " ") + ')'}{" Part $pi"}{" [$vf]"}

The $pi section doesn't work, as it's only for movies., but I've tried several other attempts but none really give anything ideal. Is there a way to search for "Part x" in the name and just copy that when present?
Sorry if this is easy, i'm pretty early into using filebot.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Episode - Episode with Multi Part support

Post by rednoah »

You can use the duplicate index binding {di} if you want a counter for files matched to the exact same episode object.

Copying information from the filename is possible in many ways. Usually something like {fn.match(/regex/)}.
:idea: Please read the FAQ and How to Request Help.
cman
Posts: 4
Joined: 03 Dec 2016, 06:20

Re: Episode - Episode with Multi Part support

Post by cman »

rednoah wrote:You can use the duplicate index binding {di} if you want a counter for files matched to the exact same episode object.

Copying information from the filename is possible in many ways. Usually something like {fn.match(/regex/)}.
Thanks for the direction. Took some playing around but i found a solution. If anyone has a cleaner way to accomplish it, or see any problems any guidance will help. Part of my problems is there would be episode titles including Part 1 or Part 2, but not multiples of the same episode

Z:/Media/TV Shows/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’?""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y})/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{norm(n) +' - '} {episode.special ? 'S00E'+special.pad(2) : s00e00} {' - '+ norm(t)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|special[ ._-]edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[.]/, " ") + ')'}{model.episode.count{ it == episode } > 1 ? " - "+fn.match(/(?i:Part [0-9])/).toLowerCase ().upperInitial() +" of "+{model.episode.count{ it == episode }} : null}{" [$vf]"}

Basically the above (with examples),
- Puts the TV show contents into the TV directory, sorted by Show Title (start year)
/TV Shows/Show Name (yyyy)/
- Organize folders per Season including Specials
/TV Shows/Show Name (yyyy)/Season 01/
/TV Shows/Show Name (yyyy)/Special/
- Renames episode name to the below,
/Show Name, The (yyyy) - SxxExx - Episode Name, The - Part 1 of 2 [1080p].extension
/Show Name, The (yyyy) - SxxExx - Episode Name, The [1080p].extension
/Show Name (yyyy) - SxxExx - Episode Name [480p].extension

And some examples of the dumb problem i was trying to fix
/Show Name (yyyy) - SxxE10 - Episode Name [1080p].extension
/Show Name (yyyy) - SxxE11 - Episode Name [1080p].extension
/Show Name (yyyy) - SxxE12 - Episode Name Part 1 [480p].extension
/Show Name (yyyy) - SxxE13 - Episode Name Part 2 [480p].extension
/Show Name (yyyy) - SxxE14 - Episode Name Part 1 - Part 1 of 2 [480p].extension
/Show Name (yyyy) - SxxE14 - Episode Name Part 1 - Part 2 of 2 [480p].extension
/Show Name (yyyy) - SxxE15 - Episode Name - Part 1 of 3 [480p].extension
/Show Name (yyyy) - SxxE15 - Episode Name - Part 2 of 3 [480p].extension
/Show Name (yyyy) - SxxE15 - Episode Name - Part 3 of 3 [480p].extension

Any other opinions on other solutions would be appreciated. I'm still new at this and all my methods seem quite heavy handed performing these naming schemes.
ranhalt
Posts: 2
Joined: 04 Dec 2016, 03:09

Re: Episode - Episode with Multi Part support

Post by ranhalt »

What's weird is that Filebot used to leave the episode part number in the rename, and it still pulls it from thetvdb, but then it drops it. That was a recent development in the past few weeks. How do we change it back so it just leaves the multi part number in the name?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Episode - Episode with Multi Part support

Post by rednoah »

{t} does a couple of cleanup operations on the title. Removing trailing parenthesis used to be part of that but that step has been disabled now due to popular request in the latest revision.

Note that having two different SxE numbers with two different episode titles, possibly ending with (1) or (2) is a completly different case than having the same SxE number twice hand having FileBot count episode duplicates.


PS: I don't even know if there's a corresponding {dc} duplicate count binding. If not, then I'll add that for next release.
:idea: Please read the FAQ and How to Request Help.
ranhalt
Posts: 2
Joined: 04 Dec 2016, 03:09

Re: Episode - Episode with Multi Part support

Post by ranhalt »

I appreciate it! Yeah I can understand the example you mean. I think the most common example that people preferred is when it's like:

The X-Files 6x22 Biogenesis (1)
The X-Files 7x01 The Sixth Extinction (2)
The X-Files 7x02 The Sixth Extinction II Amor Fati (3)
cman
Posts: 4
Joined: 03 Dec 2016, 06:20

Re: Episode - Episode with Multi Part support

Post by cman »

This is definitely a non-typical case. The situation occurs sometimes in serialized uploaded shows where due to errors during broadcasting or uploading limitations or errors it can be provided as multiple files per video. Keeping them split up keeps it in line with how the show was originally broadcast so i didn't really want to splice them all together in a single file.

If you could add a duplicate count to the bindings it would definitely be better, but ideally you'd then need an index binding so you can produce a 1of2 2of2 cleanly... otherwise you're basically doing what i had to hack together. Does seem to work though, if anybody else gets the same problem, feel free.
Post Reply