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

All about user-defined episode / movie format expressions
Post Reply
User avatar
rednoah
The Source
Posts: 14942
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: 14942
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.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests