fn:amc movie multiple options extreme case

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

fn:amc movie multiple options extreme case

Post by ZGab »

Hi,

I found a movie case that challenge Automated Media Center script :)

The movie "Voyage au centre de la Terre" ("Journey to the Center of the Earth" for english name) have been released by 3 different production the same year (2008) : Searching with --lang fr, two results are possible : 45361 and 88751.
I know my movie is tmdbid:88751, but in non-strict mode it returns tmdbid:45361
I tried with --filter "tmdbid == 88751" without any success, tmdbid seem's not to be accessible here.

I know that by GUI I'll find it, but I want to use fn:amc if possible to keep my configuration and post-script execution (--def exec)

In strict mode (original error, request non-strict mode) :

Code: Select all

+ filebot -script fn:amc '/movie/Voyage Au Centre De La Terre (2008).avi' --log fine --log-file /var/services/homes/admeden/amc_test.log --action test --filter 'println json; true' --conflict fail --lang fr --encoding UTF-8 --def mylang=FR output=/movie/ music=n artwork=y backdrops=y clean=n storeReport=n minLengthMS=180000 ut_label=Movie movieFormat=@movieFormat_test.groovy seriesFormat=@seriesFormat_test.groovy animeFormat=@animeFormat_test.groovy musicFormat=@musicFormat_test.groovy
Locking /var/services/homes/admeden/amc_test.log
Run script [fn:amc] at [Sat Jun 04 01:03:06 GMT+01:00 2016]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/movie/Voyage Au Centre De La Terre (2008).avi]
Apply Filter: {println json; true}
{"@type":"net.filebot.web.Movie","year":2008,"imdbId":-1,"tmdbId":45361,"language":"fr","id":45361,"name":"Voyage Au Centre De La Terre","aliasNames":["Journey to the Center of the Earth"]}
{"@type":"net.filebot.web.Movie","year":2008,"imdbId":-1,"tmdbId":88751,"language":"fr","id":88751,"name":"Voyage au centre de la Terre","aliasNames":["Journey to the Center of the Earth"]}
{"@type":"net.filebot.web.Movie","year":2008,"imdbId":-1,"tmdbId":16929,"language":"fr","id":16929,"name":"Journey to the Center of the Earth","aliasNames":[]}
CmdlineException: [null/Voyage Au Centre De La Terre (2008).avi] Multiple options: Force auto-select requires non-strict matching: [Voyage Au Centre De La Terre (2008), Voyage au centre de la Terre (2008)]
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: journey to the center of the earth 2008
In non-strict mode, a movie is found but the tmdbid:45361 is returned, not the wanted tmdbid:88751 :

Code: Select all

$ filebot -script fn:amc -non-strict '/movie/Voyage Au Centre De La Terre (2008).avi' --log fine --log-file amc_test.log --action test --filter 'println json; true' --conflict fail --lang fr --encoding UTF-8 --def mylang=FR output=/movie/ music=n artwork=y backdrops=y clean=n storeReport=n minLengthMS=180000 ut_label=Movie movieFormat=@movieFormat_test.groovy seriesFormat=@seriesFormat_test.groovy animeFormat=@animeFormat_test.groovy musicFormat=@musicFormat_test.groovy
Locking /var/services/homes/admeden/amc_test.log
Run script [fn:amc] at [Sat Jun 04 00:13:38 GMT+01:00 2016]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/movie/Voyage Au Centre De La Terre (2008).avi]
Apply Filter: {println json; true}
{"@type":"net.filebot.web.Movie","year":2008,"imdbId":-1,"tmdbId":45361,"language":"fr","id":45361,"name":"Voyage Au Centre De La Terre","aliasNames":["Journey to the Center of the Earth"]}
{"@type":"net.filebot.web.Movie","year":2008,"imdbId":-1,"tmdbId":88751,"language":"fr","id":88751,"name":"Voyage au centre de la Terre","aliasNames":["Journey to the Center of the Earth"]}
{"@type":"net.filebot.web.Movie","year":2008,"imdbId":-1,"tmdbId":16929,"language":"fr","id":16929,"name":"Journey to the Center of the Earth","aliasNames":[]}
[TEST] Rename [/movie/Voyage Au Centre De La Terre (2008).avi] to [/movie/Voyage Au Centre De La Terre (Journey to the Center of the Earth) (2008 PG-13)/Voyage Au Centre De La Terre (2008) [1080p, HEVC, DTS, 6ch, FR].avi]
Processed 1 files
User avatar
rednoah
The Source
Posts: 23056
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: fn:amc movie multiple options extreme case

Post by rednoah »

{imdbid} and {tmdbid} are String objects, so:

Code: Select all

--filter "tmdbid == /88751/"
:idea: Please read the FAQ and How to Request Help.
ZGab
Posts: 17
Joined: 09 May 2016, 20:35

Re: fn:amc movie multiple options extreme case

Post by ZGab »

Urocks it works !

Code: Select all

$ filebot -script fn:amc '/movie/Voyage au centre de la Terre (2008).avi' --log fine --log-file /var/services/homes/admeden/amc_test.log --action test --filter 'tmdbid == /88751/' --conflict fail --lang fr --encoding UTF-8 --def mylang=FR output=/movie/ music=n artwork=y backdrops=y clean=n storeReport=n minLengthMS=180000 ut_label=Movie movieFormat=@movieFormat_test.groovy seriesFormat=@seriesFormat_test.groovy animeFormat=@animeFormat_test.groovy musicFormat=@musicFormat_test.groovy
Locking /var/services/homes/admeden/amc_test.log
Run script [fn:amc] at [Sat Jun 04 10:54:57 GMT+01:00 2016]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/movie/Voyage au centre de la Terre (2008).avi]
Apply Filter: {tmdbid == /88751/}
[TEST] Rename [/movie/Voyage au centre de la Terre (2008).avi] to [/movie/Voyage au centre de la Terre/Voyage au centre de la Terre (Journey to the Center of the Earth) (2008 PG)/Voyage au centre de la Terre (2008) [1080p, HEVC, DTS, 6ch, FR].avi]
Processed 1 files
One more question about filters.
I've --filter 'println json; true' for my tests, but I do not find how to add the new filter 'tmdbid == /12345/' without suppress previous one :
- putting two --filter 'println json; true' --filter 'tmdbid == /12345/' options make it keep only last one defined
- putting both in same switch definition doesn't works --filter 'println json; true; tmdbid == /12345/'
- putting both in same switch definition using condition is syntactically wrong --filter '(println json; true) && (tmdbid == /12345/)'

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

Re: fn:amc movie multiple options extreme case

Post by rednoah »

I'm fairly sure that the middle one works. The true statement has no effect though. :D

Statement; statement; etc; boolean expression
:idea: Please read the FAQ and How to Request Help.
Post Reply