Page 1 of 1

Automating .file_info File Creation For Plex Plug-in

Posted: 11 Mar 2018, 11:44
by tolagarf
Hello all, I use Subzero (Plex Plug-in) to fetch my subtitles like so many others and with version 2.5 there's a new option to have Subzero look for a .file_info for extended attributives that Filebot supposedly can create, so I can score a 100% hit on subtitles search since I rename my files. It's not that I really want to rename my files, but I have to in order to keep up with Plex file naming standards. Subzero tells you to look at it's wiki, but that only confused me more than I was before. I'm wondering if anyone who uses Subzero + Filebot already set up such a system to create these .file_info files, because I have not a single clue how to do this, and my googles searches were non-conclusive to say the least.

Subzero Wiki section: https://github.com/pannal/Sub-Zero.bundle/wiki/Refiners

Now I did look into this a bit further and it seems these .file_info files can be created with the xattr command for Filebot, but I'm just not sure how to implement that in my current script, if it can be at all since I call my script from uTorrent for each complete torrent. I guess it might be possible to call a Windows .cmd file instead, but not really sure if the info is carried over from uTorrent that way.

This is my current Filebot command-line setup, hopefully someone has an idea how to do this:

Code: Select all

filebot.exe -script fn:amc --output "F:/Downloads" --action copy --conflict skip -non-strict "F:/!torrent" --log-file "F:/Downloads/amc.log" --def excludeList=amc.txt --def movieFormat="{genres.contains(/Documentary/) ? 'D:/Docus/' : 'D:/Movies/'}/{plex.name}/{plex.name}{'.'+vf}{'.'+vc}{'.'+ac}{'-'+group}" seriesFormat="{genres.contains(/Documentary/) ? 'D:/Docus/' : 'D:/TV Shows/'}{plex.tail}{'.'+source}{'.'+vf}{'.'+vc}{'.'+ac}{'-'+group}" animeFormat="D:/TV Shows/'}{plex.tail}{'.'+source}{'.'+vf}{'.'+vc}{'.'+ac}{'-'+group}" musicFormat="D:/Musik/{n}/{fn}" unsorted=y music=y extractFolder="F:/Downloads" artwork=n deleteAfterExtract=y clean=y reportError=y gmail=xxx:xxx --filter "age < 7 || !model.any{ it.age < 7 }" --def "ut_label=TV"

Re: Automating .file_info File Creation For Plex Plug-in

Posted: 11 Mar 2018, 18:18
by rednoah
Here's an example how xattr work with FileBot:
viewtopic.php?f=3&t=324#p27518

The Subzero manual you posted states that .file_info is an option if xattr is not supported. If xattr is supported you don't need .file_info at all. If xattr is not supported, then you also can't create .file_info files from them. So either you're lucky and don't have to do anything, or you're out of luck and can't do anything.

Re: Automating .file_info File Creation For Plex Plug-in

Posted: 11 Mar 2018, 18:58
by tolagarf
Thank you for insights... I guess? Hehe...

I'm running Windows 10 Enterprise and I use java x64, but I checked the java system properties and there is no option to turn on/off anything to do with xattr. Guess it's not supported. So yeah I'm still clueless. I guess it's not possible then...

Re: Automating .file_info File Creation For Plex Plug-in

Posted: 11 Mar 2018, 19:18
by rednoah
xattr is a filesystem feature. If you're using a local drive formatted with NTFS then it'll work. If you're using an SMB share then xattr support depends on the SMB server and SMB configuration. SMB shares on Synology NAS devices usually have full support for xattr.

Re: Automating .file_info File Creation For Plex Plug-in

Posted: 11 Mar 2018, 19:25
by tolagarf
rednoah wrote: 11 Mar 2018, 19:18 xattr is a filesystem feature. If you're using a local drive formatted with NTFS then it'll work. If you're using an SMB share then xattr support depends on the SMB server and SMB configuration. SMB shares on Synology NAS devices usually have full support for xattr.
I am using local drive with NTFS, so I can only assume it's working. I disabled the option to retrieve original filename from .file_info in Subzero, but kept the option "I rename my files using: Filebot". Guess this should be enough.

Thanks for the assist :)

Re: Automating .file_info File Creation For Plex Plug-in

Posted: 11 Mar 2018, 19:34
by rednoah
If it's a local NTFS drive, then it'll work.

You can view xattr like so:

Code: Select all

filebot -script fn:xattr D:/Movies

Re: Automating .file_info File Creation For Plex Plug-in

Posted: 23 Mar 2018, 12:13
by devster
rednoah wrote: 11 Mar 2018, 18:18 Here's an example how xattr work with FileBot:
viewtopic.php?f=3&t=324#p27518

The Subzero manual you posted states that .file_info is an option if xattr is not supported. If xattr is supported you don't need .file_info at all. If xattr is not supported, then you also can't create .file_info files from them. So either you're lucky and don't have to do anything, or you're out of luck and can't do anything.
Maybe they can't be created from xattr but they could be created from an exec command:

Code: Select all

filebot ... --def exec="touch {quote f.dir}/.file_info ; echo '{n} - {s00e00} - {e}={fn}' | tee -a  {quote f.dir}/.file_info"
or somesuch, I have no idea if the above actually works.