Problem with nfo script

Any questions? Need some help?
Post Reply
frontrange
Posts: 23
Joined: 11 Dec 2023, 17:09

Problem with nfo script

Post by frontrange »

I just installed filebot on my Rocky 9 server and am having trouble getting it to work right:

Console Output: Select all

$ filebot -rename '/share/movies/Zulu (1964).mkv'
Classify media files
* Consider specifying --db TheMovieDB::TV to force Episode Mode
* Consider specifying --db TheMovieDB to force Movie Mode
Rename movies using [TheMovieDB]
Auto-detect movie from context [/share/movies/Zulu (1964).mkv]
[MOVE] Skipped [/share/movies/Zulu (1964).mkv] because [/share/movies/Zulu (1964).mkv] already exists
Processed 0 files
$ getfattr '/share/movies/Zulu (1964).mkv'
getfattr: Removing leading '/' from absolute path names
# file: share/movies/Zulu (1964).mkv
user.DSSlcr
user.DSSmtag
user.DSSpurg
user.net.filebot.mediainfo
user.net.filebot.mediainfo.mtime

Console Output: Select all

$ filebot -script fn:nfo '/share/movies/Zulu (1964).mkv'
[XATTR NOT FOUND] /share/movies/Zulu (1964).mkv
Done ヾ(@⌒ー⌒@)ノ
Note - I'm a developer of enterprise storage software, the 3 DSS xattrs are part of our software package, I don't know if having these xattrs in place is breaking things, doesn't seem like it should... Anyway I also tried a file that started with none of my xattrs:

Console Output: Select all

$ getfattr 'Short Circuit (1986).mkv'
$ filebot --db TheMovieDB -rename 'Short Circuit (1986).mkv'
Rename movies using [TheMovieDB]
Auto-detect movie from context [/share/movies/Short Circuit (1986).mkv]
[MOVE] Skipped [/share/movies/Short Circuit (1986).mkv] because [/share/movies/Short Circuit (1986).mkv] already exists
Processed 0 files
$ getfattr 'Short Circuit (1986).mkv'
# file: Short Circuit (1986).mkv
user.net.filebot.mediainfo
user.net.filebot.mediainfo.mtime

Console Output: Select all

$ filebot -script fn:nfo  'Short Circuit (1986).mkv'
[XATTR NOT FOUND] /share/movies/Short Circuit (1986).mkv
Done ヾ(@⌒ー⌒@)ノ
It produced the same result, no nfo file. Clearly the xatts are there, so why the error message it's not found?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Problem with nfo script

Post by rednoah »

:idea: net.filebot.metadata is the xattr metadata that you need, i.e. movie / series information as json, not to be confused with net.filebot.mediainfo which is the raw mediainfo table:

Console Output: Select all

$ filebot -script fn:xattr .
...
	net.filebot.metadata: {"@type":"Episode","seriesName":"Alias","season":1,"episode":1,"title":"Truth Be Told","airdate":{"year":2001,"month":9,"day":30},"id":180267,"seriesInfo":{"database":"TheTVDB","order":"Airdate","language":"en","type":"TV Series","id":75930,"name":"Alias","aliasNames":["Alias - Die Agentin","Alias (2001)","זהות בדויה","Alias - Codinome Perigo","Шпионка","特務A"],"certification":"TV-14","startDate":{"year":2001,"month":9,"day":30},"genres":["Action","Adventure","Drama","Suspense"],"network":"ABC (US)","rating":8.2,"ratingCount":3316,"runtime":45,"status":"Ended"}}


:!: Since the file was skipped, FileBot did not store xattr metadata for this file, and so the file does not have xattr metadata is subsequent calls:

Code: Select all

[MOVE] Skipped [/share/movies/Zulu (1964).mkv] because [/share/movies/Zulu (1964).mkv] already exists
Processed 0 files


:arrow: If the files are already well-named then you need to use --output to move/rename the file to a different folder or use --format {plex.id} to ensure a different file name.

Shell: Select all

--output "/path/to/new-target-folder" --format "{plex.id}"
** The Fetch artwork and NFO files (v2) script notably assumes that movies are well-organized into movie folders. The --format "{plex.id}" option ensures standard naming and folder structure.
:idea: Please read the FAQ and How to Request Help.
frontrange
Posts: 23
Joined: 11 Dec 2023, 17:09

Re: Problem with nfo script

Post by frontrange »

Awesome, Thanks!

Great little tool, just one more QQ, instead of writing the nfo file, is there an option to send it to stdout?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Problem with nfo script

Post by rednoah »

Unfortunately, the nfo script does not support writing *.nfo file contents to console output.
:idea: Please read the FAQ and How to Request Help.
frontrange
Posts: 23
Joined: 11 Dec 2023, 17:09

Re: Problem with nfo script

Post by frontrange »

Any idea why I'm seeing this:

Console Output: Select all

$ filebot -script fn:nfo  'Police State (2023)/Police State (2023).mkv'
[MOVIE] Police State (2023) [/share/movies/Movies/Police State (2023)/Police State (2023).mkv]
Generate Movie NFO: Police State (2023) [/share/movies/Movies/Police State (2023)/Police State (2023).nfo]
No signature of method: java.util.ArrayList.replaceAll() is applicable for argument types: (String, String) values: [\p{Punct}, ]
Possible solutions: replaceAll(java.util.function.UnaryOperator), replace(java.util.Map)
groovy.lang.MissingMethodException: No signature of method: java.util.ArrayList.replaceAll() is applicable for argument types: (String, String) values: [\p{Punct}, ]
Possible solutions: replaceAll(java.util.function.UnaryOperator), replace(java.util.Map)
        at Script.doCall(Script:197)
        at Script.doCall(Script)
        at Script.doCall(Script:196)
        at Script.doCall(Script:195)
        at Script.doCall(Script)
        at Script.doCall(Script:186)
        at Script.doCall(Script)
        at Script.fileFragment(Script:185)
        at Script.doCall(Script:43)
        at Script.doCall(Script)
        at Script.doCall(Script:15)
        at Script.doCall(Script)
        at net.filebot.cli.ScriptShellBaseClass.XML(Unknown Source)
        at Script.fetchMovieNfo(Script:14)
        at Script.doCall(Script:230)
        at Script.run(Script:225)
        at net.filebot.GroovyEngine.eval(Unknown Source)
        at net.filebot.cli.ScriptShell.evaluate(Unknown Source)
        at net.filebot.cli.ScriptShell.runScript(Unknown Source)
        at net.filebot.cli.ArgumentProcessor.runScript(Unknown Source)
        at net.filebot.cli.ArgumentProcessor.run(Unknown Source)
        at net.filebot.Main.main(Unknown Source)

Error (o_O)
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Problem with nfo script

Post by rednoah »

It's a bug in filebot triggered by invalid media files, i.e. files where mediainfo cannot read media / stream information:
viewtopic.php?p=61839#p61839


The issue is fixed with the latest revision:
viewtopic.php?t=1609
:idea: Please read the FAQ and How to Request Help.
Post Reply