MultiCD naming: {pi} VS {fn.match(/CD\d/)}

All about user-defined episode / movie format expressions
Post Reply
User avatar
rednoah
The Source
Posts: 18349
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

MultiCD naming: {pi} VS {fn.match(/CD\d/)}

Post by rednoah » 08 Jul 2013, 12:20

1. {pi} binding
FileBot recognizes multi-part movies by matching multiple files to the same movie. Hence if you want to rename multi-part movies you need to pass all files into the same input set. The assumption here is only that parts are in alphabetical order.

2. Parse CD<i> from filename via fn.match()
If your files happen to be already well-named with CD123 then you can easily grab the CDindex from the filename via fn.match() like so:

e.g.

Code: Select all

{fn.match(/CD\d+/).upper()}
:idea: Please read the FAQ and How to Request Help.

User avatar
Mute
Power User
Posts: 11
Joined: 19 Feb 2014, 17:13

Re: MultiCD naming: {pi} VS {fn.match(/CD\d/)}

Post by Mute » 12 Jun 2014, 20:47

What if my multi-CD music files are sorted as follows:

Artist\Album\CD01\Track-name.ext
Artist\Album\CD02\Track-name.ext

Is there are way to rename and keep the CD number in the directory structure?

User avatar
rednoah
The Source
Posts: 18349
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: MultiCD naming: {pi} VS {fn.match(/CD\d/)}

Post by rednoah » 13 Jun 2014, 02:14

Then you just scan the whole path for CD00 patterns ;)

Code: Select all

{file.path.match(/CD\d+/).upper()}
:idea: Please read the FAQ and How to Request Help.

AbedlaPaille
Posts: 43
Joined: 12 Apr 2020, 04:02

Re: MultiCD naming: {pi} VS {fn.match(/CD\d/)}

Post by AbedlaPaille » 07 May 2020, 14:50

What reasons could there be for the {pi} binding to not catch a few of my multi-part movies that are named the same, processed in the same input and matched to the same movie by theMovieDB? It doesn't display CD123, but the binding otherwise works on about half my multi part movies, bit weird. The half it doesn't work on still gets caught by $di too. I'm thinking hard but i don't see what's wrong here.

Edit:

As it turns out of the 6 movies in question 3 were legit duplicates and not parts of a multi part, so props on you software recognition for being smarter than me lol.

I still have Gone with the Wind, Godfather Part II and La sociologie est un sport de combat not recognized as CD parts, despite genuinely being ones.

Gone with the wind and godfather have the two parts at exactly the same filesize, might be the issue? Different lengths though. But La sociologie est un sport de combat as neither the same length nor the same filesize so i'm lost.

By just manually renaming those 3 CDs and using a fn Match i'll go around my issue, but i'm still curious if you have any leads on what might be going on.

User avatar
rednoah
The Source
Posts: 18349
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: MultiCD naming: {pi} VS {fn.match(/CD\d/)}

Post by rednoah » 07 May 2020, 16:17

1.
AbedlaPaille wrote:
07 May 2020, 14:50
What reasons could there be for the {pi} binding to not catch a few of my multi-part movies
There are countless possible reasons. If you provide file paths as text so I can run a few tests and see what the cause might be in your particular case.


:idea: Please read How to Request Help.


2.
AbedlaPaille wrote:
07 May 2020, 14:50
As it turns out of the 6 movies in question 3 were legit duplicates and not parts of a multi part, so props on you software recognition for being smarter than me lol.
When I debug these things, I sometimes come to the same conclusion. :lol:


3.
AbedlaPaille wrote:
07 May 2020, 14:50
Gone with the wind and godfather have the two parts at exactly the same filesize, might be the issue? Different lengths though. But La sociologie est un sport de combat as neither the same length nor the same filesize so i'm lost.
The media characteristics can make a difference. The file size doesn't matter, but multi-part movie files ideally all have the same video codec, audio codec, same resolution, comparable duration, etc.

If it's indeed related to media characteristics, then the MediaInfo Inspector might be able to shed light on this phenomenon:
viewtopic.php?t=4285
:idea: Please read the FAQ and How to Request Help.

AbedlaPaille
Posts: 43
Joined: 12 Apr 2020, 04:02

Re: MultiCD naming: {pi} VS {fn.match(/CD\d/)}

Post by AbedlaPaille » 15 May 2020, 23:52

Code: Select all

The file size doesn't matter, but multi-part movie files ideally all have the same video codec, audio codec, same resolution, comparable duration, etc.
That was it in every occurence. Multi part movies that had some of those differing. Had to go manual on them.

User avatar
rednoah
The Source
Posts: 18349
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: MultiCD naming: {pi} VS {fn.match(/CD\d/)}

Post by rednoah » 16 May 2020, 04:23

Can you provide MediaInfo dumps for a set of multi-part movie files?

Code: Select all

filebot -script fn:mediainfo *.mkv
:idea: Please read the FAQ and How to Request Help.

Post Reply