FileBot 4.7 - Regression on matching (strict + lang fr)

All your suggestions, requests and ideas for future development
Post Reply
ZGab
Posts: 17
Joined: 09 May 2016, 20:35

FileBot 4.7 - Regression on matching (strict + lang fr)

Post by ZGab »

Hi,

FileBot 4.7 seem's have some regression while trying to rename file with fn:amc in strict mode and lang FR (I did not have this problem with previous version 4.6.1)

My FileBot version :

Code: Select all

$> filebot -version
FileBot 4.7 (r3923) / Java(TM) SE Runtime Environment 1.8.0_91 (headless)
The test (with simpliest movie format, my targetted movie format is so much complex) :

Code: Select all

$> filebot -script "fn:amc" --log "all" --action "test" --conflict "fail" --lang "fr" --encoding "UTF-8" --def movieFormat="{n}" "Le grand jeu (2015).avi"
Run script [fn:amc] at [Mon May 09 21:43:29 GMT+01:00 2016]
Parameter: movieFormat = {n}
Argument: /movie/Le grand jeu (2015).avi
Input: /movie/Le grand jeu (2015).avi
Le grand jeu (2015).avi [series: Grand, movie: The Great Game (2015)]
Exclude Series: Grand
Group: [tvs:null, mov:the great game 2015] => [Le grand jeu (2015).avi]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/movie/Le grand jeu (2015).avi]
CmdlineException: [null/Le grand jeu (2015).avi] Multiple options: Force auto-select requires non-strict matching: [Le Grand jeu (2015), Le Grand Jeu (2015)]
Failed to identify or process any files
net.filebot.cli.CmdlineException: Failed to identify or process any files
        at net.filebot.cli.CmdlineOperations.renameAll(CmdlineOperations.java:590)
        at net.filebot.cli.CmdlineOperations.renameMovie(CmdlineOperations.java:502)
        at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:105)
        at net.filebot.cli.ScriptShellBaseClass.rename(ScriptShellBaseClass.java:336)
        at Script1$_run_closure72.doCall(Script1.groovy:398)
        at Script1.run(Script1.groovy:356)
        at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:62)
        at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:72)
        at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:114)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
        at net.filebot.Main.main(Main.java:120)
Failed to rename movie: the great game 2015
Failure (°_°)
The error is non-strict requirement, but proposal list contains only case-difference naming : [Le Grand jeu (2015), Le Grand Jeu (2015)]

With the name set in english (Le Grand Jeu => The Great Game)

Code: Select all

$> filebot -script "fn:amc" --log "all" --action "test" --conflict "fail" --l ang "fr" --encoding "UTF-8" --def movieFormat="{n}" "The Great Game (2015).avi"
Run script [fn:amc] at [Mon May 09 21:56:05 GMT+01:00 2016]
Parameter: movieFormat = {n}
Argument: /movie/The Great Game (2015).avi
Input: /movie/The Great Game (2015).avi
The Great Game (2015).avi [series: Game, movie: The Great Game (2015)]
Exclude Series: Game
Group: [tvs:null, mov:the great game 2015] => [The Great Game (2015).avi]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/movie/The Great Game (2015).avi]
CmdlineException: [null/The Great Game (2015).avi] Multiple options: Force auto-select requires non-strict matching: [The Next Great American Game (2015), Le Grand jeu (2015), The Devil's Game (2008), The Game (1997), Mystery, Alaska (1999), Game (2011), Alpha et Oméga 3 : les grands jeux (2014), Game (2003), Great! (1986)]
Failed to identify or process any files
net.filebot.cli.CmdlineException: Failed to identify or process any files
        at net.filebot.cli.CmdlineOperations.renameAll(CmdlineOperations.java:590)
        at net.filebot.cli.CmdlineOperations.renameMovie(CmdlineOperations.java:502)
        at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:105)
        at net.filebot.cli.ScriptShellBaseClass.rename(ScriptShellBaseClass.java:336)
        at Script1$_run_closure72.doCall(Script1.groovy:398)
        at Script1.run(Script1.groovy:356)
        at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:62)
        at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:72)
        at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:114)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
        at net.filebot.Main.main(Main.java:120)
Failed to rename movie: the great game 2015
Failure (°_°)
With english naming, lang not set (defaulting to en) it works, but trolling I need FileBot no more :roll:

Code: Select all

$> filebot -script "fn:amc" --log "all" --action "test" --conflict "fail" --e ncoding "UTF-8" --def movieFormat="{n}" "The Great Game (2015).avi"
Run script [fn:amc] at [Mon May 09 21:58:18 GMT+01:00 2016]
Parameter: movieFormat = {n}
Argument: /movie/The Great Game (2015).avi
Input: /movie/The Great Game (2015).avi
The Great Game (2015).avi [series: Game, movie: The Great Game (2015)]
Exclude Series: Game
Group: [tvs:null, mov:the great game 2015] => [The Great Game (2015).avi]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/movie/The Great Game (2015).avi]
[TEST] Rename [/movie/The Great Game (2015).avi] to [/movie/The Great Game.avi]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノ
Finally with french naming, lang set to french and non strict mode it works :

Code: Select all

$> filebot -script "fn:amc" --log "all" --action "test" --conflict "fail" --l ang "fr" --encoding "UTF-8" -non-strict --def movieFormat="{n}" "Le grand jeu (2015).avi"
Run script [fn:amc] at [Mon May 09 22:03:55 GMT+01:00 2016]
Parameter: movieFormat = {n}
Argument: /movie/Le grand jeu (2015).avi
Input: /movie/Le grand jeu (2015).avi
Le grand jeu (2015).avi [series: Grand, movie: The Great Game (2015)]
Exclude Series: Grand
Group: [tvs:null, mov:the great game 2015] => [Le grand jeu (2015).avi]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/movie/Le grand jeu (2015).avi]
[TEST] Rename [/movie/Le grand jeu (2015).avi] to [/movie/Le Grand jeu.avi]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノ
Some other movies produces such failure ouput
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot 4.7 - Regression on matching (strict + lang fr)

Post by rednoah »

I'm pretty sure you won't find another two movies from same year that have been translated to the same name. Pretty sure strict mode does exactly what it's supposed to in this case. :lol:

Le Grand jeu:
https://www.themoviedb.org/movie/367546-le-grand-jeu

Le Grand Jeu:
https://www.themoviedb.org/movie/364477-le-grand-jeu
:idea: Please read the FAQ and How to Request Help.
ZGab
Posts: 17
Joined: 09 May 2016, 20:35

Re: FileBot 4.7 - Regression on matching (strict + lang fr)

Post by ZGab »

Oh craaaapp :)

Well done rednoah !

Remark : Maybe we can have tmdbId in proposal list in order to make this more understandable ?

How can I specify tmdb in command line to choose good one in strict or non-strict mode ? (finally not sure, even in passed tests)
In my case it's : https://www.themoviedb.org/movie/367546-le-grand-jeu

Indeed this movie don't pass in 4.6.1 too ... (I've some others I've passed pre-renaming them manually)

Code: Select all

$> filebot -version
FileBot 4.6.1 (r3315) / Java(TM) SE Runtime Environment 1.8.0_91 (headless)

Code: Select all

$> filebot -script "fn:amc" --log "all" --action "test" --conflict "fail" --l ang "fr" --encoding "UTF-8" --def movieFormat="{n}" "Le grand jeu (2015).avi"
Run script [fn:amc] at [Mon May 09 23:28:50 GMT+01:00 2016]
Parameter: movieFormat = {n}
Argument: /movie/Le grand jeu (2015).avi
Input: /movie/Le grand jeu (2015).avi
Le grand jeu (2015).avi [series: Grand, movie: The Great Game (2015)]
Exclude Series: Grand
Group: [tvs:null, mov:the great game 2015] => [Le grand jeu (2015).avi]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/movie/Le grand jeu (2015).avi]
CmdlineException: [null/Le grand jeu (2015).avi] Multiple options: Force auto-select requires non-strict matching: [Le Grand jeu (2015), Le Grand Jeu (2015)]
CmdlineException: Unable to identify or process any files
Failed to rename movie: the great game 2015
Failure (°_°)
Thanks and sorry about not checking more about this :/ !
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot 4.7 - Regression on matching (strict + lang fr)

Post by rednoah »

That kind of thing should be done manually in the GUI, but if you must, it can probably be done via the command-line by using the --filter option. In this case you could filter by rating, because the second one has a rating of 0. However, the first option is probably the one you want anyway, so using -non-strict is probably the easiest way to make this special case work.

You can easily check name/year/id by making a manual search in the GUI and setting the format to name/year/id, plus if you get "the same" result multiple times, then you already know that it can't actually be the same. You'll never get the same option (by ID) twice.


EDIT:

e.g.

Code: Select all

filebot --action test -rename * --db themoviedb --filter "rating > 0" --format "{ny} [{imdbid}]" --lang FR

Code: Select all

Rename movies using [TheMovieDB]
Auto-detect movie from context: [Le grand jeu (2015).avi]
Apply Filter: {rating > 0}
Include [Le Grand jeu (2015)]
Include [The Grand (2007)]
Include [Alpha et Oméga 3 : les grands jeux (2014)]
[TEST] Rename [Le grand jeu (2015).avi] to [Le Grand jeu (2015) [tt4333408].avi]
:idea: Please read the FAQ and How to Request Help.
ZGab
Posts: 17
Joined: 09 May 2016, 20:35

Re: FileBot 4.7 - Regression on matching (strict + lang fr)

Post by ZGab »

Hi,

I've another similary situation here that have to be explained :

Code: Select all

+ filebot -script fn:amc '10 Jours En Or (2012).avi' --log fine --action test --conflict fail --lang fr --encoding UTF-8 --def music=n artwork=y backdrops=y clean=n storeReport=n minLengthMS=180,000 ut_label=Movie 'movieFormat=renamed/{n} ({y})' 'seriesFormat=renamed/{n} ({y})' 'animeFormat=renamed/{n} ({y})' 'musicFormat=renamed/{n} ({y})'

Run script [fn:amc] at [Tue May 10 23:05:56 GMT+01:00 2016]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/movie/10 Jours En Or (2012).avi]
CmdlineException: [null/10 Jours En Or (2012).avi] Multiple options: Force auto-select requires non-strict matching: [10 jours en or (2012), 10 jours en or (2012)]
Failed to identify or process any files
net.filebot.cli.CmdlineException: Failed to identify or process any files
        at net.filebot.cli.CmdlineOperations.renameAll(CmdlineOperations.java:590)
        at net.filebot.cli.CmdlineOperations.renameMovie(CmdlineOperations.java:502)
        at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:105)
        at net.filebot.cli.ScriptShellBaseClass.rename(ScriptShellBaseClass.java:336)
        at Script1$_run_closure72.doCall(Script1.groovy:398)
        at Script1.run(Script1.groovy:356)
        at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:62)
        at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:72)
        at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:114)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
        at net.filebot.Main.main(Main.java:120)
Failed to rename movie: 10 jours en or 2012
I've verified in TheMovieDB, there is only one result : https://www.themoviedb.org/search?query=10+jours+en+or

The fact the auto-detection gaves two strictly identical options make me think there is something to do to make this more efficient.

In non-strict mode the movie matches successfully :

Code: Select all

+ filebot -script fn:amc '10 Jours En Or (2012).avi' -non-strict --log fine --action test --conflict fail --lang fr --encoding UTF-8 --def music=n artwork=y backdrops=y clean=n storeReport=n minLengthMS=180,000 ut_label=Movie 'movieFormat=renamed/{n} ({y})' 'seriesFormat=renamed/{n} ({y})' 'animeFormat=renamed/{n} ({y})' 'musicFormat=renamed/{n} ({y})'

Run script [fn:amc] at [Tue May 10 23:12:13 GMT+01:00 2016]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/movie/10 Jours En Or (2012).avi]
[TEST] Rename [/movie/10 Jours En Or (2012).avi] to [/movie/renamed/10 jours en or (2012).avi]
Processed 1 files
ZGab
Posts: 17
Joined: 09 May 2016, 20:35

Re: FileBot 4.7 - Regression on matching (strict + lang fr)

Post by ZGab »

Found something interesting : if I try same test from another drive (after a simple file copy), the matches in strict mode works !

The fail test is launched from a mounted USB drive (on a Synology) :

Code: Select all

$> ls -al "/volumeUSB2/usbshare/movie/10 Jours En Or (2012).avi"
-rwxrwxrwx 1 admin users 4686957821 2012-07-04 10:37 /volumeUSB2/usbshare/movie/10 Jours En Or (2012).avi
The ok test is launched from a hard drive on my Synology :

Code: Select all

$> ls -al "/volume1/downloads/movie/10 Jours En Or (2012).avi"
-rwxrwxrwx 1 admeden users 4686957821 2012-07-04 10:37 /volume1/downloads/movie/10 Jours En Or (2012).avi
Only user ownership differs, but access is full on both of them, any idea ?
ZGab
Posts: 17
Joined: 09 May 2016, 20:35

Re: FileBot 4.7 - Regression on matching (strict + lang fr)

Post by ZGab »

One more test.

After copying file in another path in USB drive, the matches is ok too ...
Can be a cache problem (maybe using inode) ?

This one is original one, fail on strict matching:

Code: Select all

$> stat "/volumeUSB2/usbshare/movie/10 Jours En Or (2012).avi"
  File: `/volumeUSB2/usbshare/movie/10 Jours En Or (2012).avi'
  Size: 4686957821      Blocks: 9154216    IO Block: 4096   regular file
Device: 4101h/16641d    Inode: 350         Links: 1
Access: (0777/-rwxrwxrwx)  Uid: ( 1024/   admin)   Gid: (  100/   users)
Access: 2016-05-10 23:41:51.151497100 +0200
Modify: 2012-07-04 10:37:20.796132700 +0200
Change: 2016-05-10 04:10:52.262240000 +0200
This one is a new copy from original, suceed on strict matching...

Code: Select all

$> stat "/volumeUSB2/usbshare/movie_new/10 Jours En Or (2012).avi"
  File: `/volumeUSB2/usbshare/movie_new/10 Jours En Or (2012).avi'
  Size: 4686957821      Blocks: 9154216    IO Block: 4096   regular file
Device: 4101h/16641d    Inode: 396         Links: 1
Access: (0777/-rwxrwxrwx)  Uid: ( 1024/   admin)   Gid: (  100/   users)
Access: 2016-05-11 00:46:44.581931900 +0200
Modify: 2012-07-04 10:37:21.000000000 +0200
Change: 2016-05-11 00:45:47.148866300 +0200
Maybe these precision can help you to have an idea about the cause of this situation ?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot 4.7 - Regression on matching (strict + lang fr)

Post by rednoah »

1.
You can use this filter expression to print more detailed information about the options in the output:

Code: Select all

--filter "println json; true"

2.
I'm not sure if this works at all, or if it's 180 ms, or 180000 ms, or if it's different depending on the current locale. Use simple numbers:


BAD

Code: Select all

--def minLengthMS=180,000
GOOD

Code: Select all

--def minLengthMS=180000
:idea: Please read the FAQ and How to Request Help.
ZGab
Posts: 17
Joined: 09 May 2016, 20:35

Re: FileBot 4.7 - Regression on matching (strict + lang fr)

Post by ZGab »

With the json output (and numeric fixed) :

Code: Select all

+ filebot -script fn:amc '11.6 (2013).avi' --log fine --action test --filter 'println json; true' --conflict fail --lang fr --encoding UTF-8 --def music=n artwork=y backdrops=y clean=n storeReport=n minLengthMS=180000 ut_label=Movie 'movieFormat=renamed/{n} ({y})' 'seriesFormat=renamed/{n} ({y})' 'animeFormat=renamed/{n} ({y})' 'musicFormat=renamed/{n} ({y})'

Run script [fn:amc] at [Wed May 11 21:24:29 GMT+01:00 2016]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/movie/11.6 (2013).avi]
Apply Filter: {println json; true}
{"@type":"net.filebot.web.Movie","year":2013,"imdbId":2655788,"tmdbId":182246,"language":"fr","id":0,"name":"11.6","aliasNames":[]}
{"@type":"net.filebot.web.Movie","year":2013,"imdbId":2655788,"tmdbId":182246,"language":null,"id":182246,"name":"11.6","aliasNames":["Onze millions six","O Grande Assalto 11.6"]}
CmdlineException: [null/11.6 (2013).avi] Multiple options: Force auto-select requires non-strict matching: [11.6 (2013), 11.6 (2013)]
Failed to identify or process any files
net.filebot.cli.CmdlineException: Failed to identify or process any files
        at net.filebot.cli.CmdlineOperations.renameAll(CmdlineOperations.java:590)
        at net.filebot.cli.CmdlineOperations.renameMovie(CmdlineOperations.java:502)
        at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:105)
        at net.filebot.cli.ScriptShellBaseClass.rename(ScriptShellBaseClass.java:336)
        at Script1$_run_closure72.doCall(Script1.groovy:398)
        at Script1.run(Script1.groovy:356)
        at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:62)
        at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:72)
        at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:114)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
        at net.filebot.Main.main(Main.java:120)
Failed to rename movie: 11 6 2013
We can read two options in json (thanks for trick :
{"@type":"net.filebot.web.Movie","year":2013,"imdbId":2655788,"tmdbId":182246,"language":"fr","id":0,"name":"11.6","aliasNames":[]}
{"@type":"net.filebot.web.Movie","year":2013,"imdbId":2655788,"tmdbId":182246,"language":null,"id":182246,"name":"11.6","aliasNames":["Onze millions six","O Grande Assalto 11.6"]}
It's differs only by language and an id (internal ?)
As the imdbid and tmdbid equals it may be obvious to determine equivalence btw the options ?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot 4.7 - Regression on matching (strict + lang fr)

Post by rednoah »

Oh well. Those two options really are the same. That is a bug.
:idea: Please read the FAQ and How to Request Help.
ZGab
Posts: 17
Joined: 09 May 2016, 20:35

Re: FileBot 4.7 - Regression on matching (strict + lang fr)

Post by ZGab »

Hello Rednoah. Just for my information, do you have some update concerning this bug resolution ? (not blocked anymore on this since I've copied files on another FS)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot 4.7 - Regression on matching (strict + lang fr)

Post by rednoah »

Should be fixed with the latest revision.
:idea: Please read the FAQ and How to Request Help.
ZGab
Posts: 17
Joined: 09 May 2016, 20:35

Re: FileBot 4.7 - Regression on matching (strict + lang fr)

Post by ZGab »

Ok nice, not sure i'll fall on this bug one more time, but good to known this as fixed.
Thanks a lot for all your job !
Post Reply