As far as I could gather FIleBot also stores the filename in user.net.filebot.filename extended attribute.
However I've noticed that whenever I process again the same file this attribute changes.
# 1st rename
user.net.filebot.filename="captive.state.2019.720p.bluray.x264-mayhem.mkv"
Output: Captive Stete (2019) [720p x264 - 5.1 DTS Eng - BluRay]-MAYHEM.mkv
# 2nd rename - maybe I changed formats and want to rename old movies
user.net.filebot.filename="Captive Stete (2019) [720p x264 - 5.1 DTS Eng - BluRay]-MAYHEM.mkv"
Output: Captive Stete (2019).mkv
I would personally prefer to always keep the first and original filename here, for reference purposes.
I will always be able to recover the original name should something go wrong with one of the formats.
I only work in black and sometimes very, very dark grey. (Batman)
# touch and rename Captive State (2019).mkv
$ filebot -script /scripts/xattr-test.groovy
captive.state.2019.720p.bluray.x264-mayhem.mkv
class java.lang.String
Done ヾ(@⌒ー⌒@)ノ
$ touch 'captive.state.2019.720p.bluray.x264-mayhem.mkv'
$ filebot -script /scripts/xattr-test.groovy
null
Cannot get property 'class' on null object
java.lang.NullPointerException: Cannot get property 'class' on null object
at Script1.run(Script1.groovy:7)
at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:64)
at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:74)
at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:163)
at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:37)
at net.filebot.Main.main(Main.java:132)
Error (o_O)
I only seem to be able to reproduce it on NTFS-3G on Linux ARM, probably a niche bug.
I suppose if reading xattr doesn't work internally and then returns nothing, then FileBot will think there's nothing, and try to set it. Less well-tested filesystem implementations typically don't support xattr well. Similar things have come up before with certain SMB server implementations.