Get rid of starting order numbers

Any questions? Need some help?
Post Reply
mistermagoo
Posts: 4
Joined: 12 May 2020, 06:53

Get rid of starting order numbers

Post by mistermagoo »

Hi folks. Newbie user here!

How to tell Filebot not to consider starting "order numbers" in original file names?
A current exmple: I have several Buster Keaton movies with these titles:

Code: Select all

12...
13.My.Wife's.Relations.1922.mkv
14.The.Blacksmith.1922.mkv
15...
If I try with these, they are NOT recognized by FileBot.
If I remove the starting order numbers, it works like a charm...

Thanks!
Bye, A.-
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Get rid of starting order numbers

Post by rednoah »

A bit of extra spacing seems to do the trick as well:

Code: Select all

[TEST] from [13. My.Wife's.Relations.1922.mkv] to [My Wife's Relations (1922).mkv]

:idea: FileBot generally works less well for extremely old movies that aren't very popular, so a little bit of extra work may be required there.


:arrow: You can always pre-process files a little bit:
viewtopic.php?t=2072

e.g.

Code: Select all

$ filebot -rename *.mkv --db file --format "{fn.after(/\d+./)}" --action TEST --log INFO
[TEST] from [13.My.Wife's.Relations.1922.mkv] to [My.Wife's.Relations.1922.mkv]
:idea: Please read the FAQ and How to Request Help.
mistermagoo
Posts: 4
Joined: 12 May 2020, 06:53

Re: Get rid of starting order numbers

Post by mistermagoo »

Wow, thanks @redhnoah, I will note it down!
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Get rid of starting order numbers

Post by kim »

if you remove the e.g. 13. part it works so...

in F2 mode
use this

Code: Select all

{fn.replaceAll(/(^\d*\.)(.+)/, '$2')}
output e.g.
The.Blacksmith.1922
EDIT:
just a space between nr. and title works

Code: Select all

{fn.replaceAll(/(^\d*\.)(.+)/, '$1 $2')}
so I dont see why filebot cant do this in the background to find a match

... but if e.g. "123. " it does not work
mistermagoo
Posts: 4
Joined: 12 May 2020, 06:53

Re: Get rid of starting order numbers

Post by mistermagoo »

kim wrote: 12 May 2020, 14:29 if you remove the e.g. 13. part it works so...

in F2 mode
use this...
Thanks for the hint!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Get rid of starting order numbers

Post by rednoah »

kim wrote: 12 May 2020, 14:29 so I dont see why filebot cant do this in the background to find a match
If we ignore the first \d. pattern, then we break 8.Mile, 12.Monkeys, 28.Days.Later, etc. So in this case, I'd be inclined to keep the current behaviour, as it ensures that popular movies with common naming work well, though at the expense of the OPs particular use case.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Get rid of starting order numbers

Post by kim »

I mean ...
1. lookup 12.Monkeys
2. no hits then try Monkeys

i believe filebot does something like this already ?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Get rid of starting order numbers

Post by rednoah »

Well, I try not to have special cases like this in my code, unless it's a common enough case that warrants the technical debt.

:idea: It's generally not an issue for popular movies, because FileBot knows all popular movies, so it doesn't matter if there's junk before or after the movie name, kinda like a human would immediately identify files, not with patterns, but with knowledge. However, FileBot has limited knowledge about 1920ies movies, so in this case it doesn't work, even though it would work for 12.Avatar.2009 and such.


EDIT:

Though, looking at it the other way around, I might consider ignoring leading numbers, and then rely on knowledge to identify 12.Monkeys and friends, as there is a naturally limited number of movies that start with numbers. :lol:
:idea: Please read the FAQ and How to Request Help.
mistermagoo
Posts: 4
Joined: 12 May 2020, 06:53

Re: Get rid of starting order numbers

Post by mistermagoo »

rednoah wrote: 14 May 2020, 03:54 Though, looking at it the other way around, I might consider ignoring leading numbers, and then rely on knowledge to identify 12.Monkeys and friends, as there is a naturally limited number of movies that start with numbers. :lol:
Right! You could add a simple option switch in the config, "ignore leading numbers"... that would be great! :D
Post Reply