Page 1 of 1

Get rid of starting order numbers

Posted: 12 May 2020, 06:59
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.-

Re: Get rid of starting order numbers

Posted: 12 May 2020, 07:23
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]

Re: Get rid of starting order numbers

Posted: 12 May 2020, 14:28
by mistermagoo
Wow, thanks @redhnoah, I will note it down!

Re: Get rid of starting order numbers

Posted: 12 May 2020, 14:29
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

Re: Get rid of starting order numbers

Posted: 13 May 2020, 13:12
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!

Re: Get rid of starting order numbers

Posted: 13 May 2020, 14:06
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.

Re: Get rid of starting order numbers

Posted: 13 May 2020, 18:02
by kim
I mean ...
1. lookup 12.Monkeys
2. no hits then try Monkeys

i believe filebot does something like this already ?

Re: Get rid of starting order numbers

Posted: 14 May 2020, 03:54
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:

Re: Get rid of starting order numbers

Posted: 21 May 2020, 16:19
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