Hi,
I am trying to figure out what seems fairly simple to do, yet I need some direction . I want to run filebot upon torrent completion in qbittorrent (Run an external program on torrent completion) and generate a text file (eg. release.txt) with the filenames of the torrent along with the media info of the video and place that file in the torrent folder.
My idea is to preserve the release name before renaming the files/folder (as a way to keep track the downloaded release in case of future video substitution or future subtitle downloading).
System environment is Ubuntu and using cli (no gui)
Any ideas?
Preserve the original file name in a text file
Re: help with file info export with cli



You can use -find -exec to generate your release.txt files after the fact. Also, good for testing your custom script. If you're using the amc script though then it's best to do it at the time, but FileBot can do it later too if needed, as long as you have xattr or history.rednoah wrote: ↑14 Sep 2019, 19:43 e.g. call a custom script and pass along file paths and metadata:Code: Select all
-exec /path/to/script.sh {f} {historic.f} {json}
Re: Preserve the original file name in a text file
Any suggestions on how to go about putting the original filename into the Finder's 'Comments' field on a Mac?
Re: Preserve the original file name in a text file
How does one set the Comments field on a Mac? Is it a Mac Finder xattr attribute? Is it an embedded media property? Is there a way to set the Comments field in Finder, or ideally via a command?
EDIT:
Looks like macOS uses the com.apple.metadata:kMDItemFinderComment xattr attribute so that makes things easy:
https://eclecticlight.co/2020/11/06/fin ... -avoiding/
EDIT 2:
Setting the com.apple.metadata:kMDItemFinderComment xattr attribute unfortunately does not seem to do the trick:
https://discussions.apple.com/thread/250638567

Shell: Select all
filebot -find /input --filter f.video -exec \
osascript -e 'tell app "Finder" to set comment of (POSIX file "{f}" as alias) to "{original}"'
EDIT 3:
It's a good example use case for the new custom post-processing scripts feature.
