Page 1 of 1

Skip processing types of files

Posted: 24 Jul 2017, 21:46
by devster
I'm using the KEEPLINK option in filebot, since this allows me to move the file to another disk but keep seeding.
However it might happen that I add again the torrent that would use that symlink to seed, and in this case transmission considers the verification of files as another complete download, thereby firing filebot another time.
How could I prevent filebot from even considering symlinks to be processed?
Unfortunately, according to this link, transmission doesn't pass the list of files as argument but rather the path, which could be a directory (potentially containing symlinks) or a symlink itself.
I'm using fn:amc on linux.

Re: Skip processing types of files

Posted: 25 Jul 2017, 02:54
by rednoah
You could just check if there's any symlinks in the input, and then decide whether to call filebot or not based on that. That's no more than 1-2 extra lines in your postprocess shell script.

@see https://linux.die.net/man/1/find

Re: Skip processing types of files

Posted: 25 Jul 2017, 17:47
by devster
Thanks, that sounds easy enough, didn't think about that.
This seems to work, sharing for posterity (transmission is the client).

Code: Select all

ARG_PATH="$TR_TORRENT_DIR/$TR_TORRENT_NAME"
...
LINKS=$(find $ARG_PATH -type l)
if [[ ${#LINKS} -gt 0 ]]
then
    exit 0
fi
As a related question, does filebot -revert also move files back to their original location?
Would I need to call it on the link or on the moved file?

Re: Skip processing types of files

Posted: 25 Jul 2017, 18:58
by rednoah
Yes, -revert will correctly revert files to their original path. You would call it on the destination path.