Skip processing files with specific torrent label(s)?

Any questions? Need some help?
Post Reply
Dresden
Posts: 5
Joined: 07 Feb 2015, 19:30

Skip processing files with specific torrent label(s)?

Post by Dresden »

I've been trying to get to power user status on a few private trackers, so I've been cross seeding. I have rTorrent execute filebot's amc script when a torrent is completed. I want to add something to my command line which will have filebot skip processing files based on the torrent's label because I have it creating symlinks into a Plex library, and I don't want it to overwrite the existing symlink with one that points to a file I'm eventually going to delete. I read through the documentation and some of the topics and I didn't find anything that meets my needs. The variable is being passed, so I'm hoping this would be possible.

Here's the command line I'm currently executing:

Code: Select all

filebot -script fn:amc --output "/plex" --log-file amc.log --action symlink --conflict override -non-strict --def "seriesFormat=/plex/TV/{n}/{'Season '+s}/{n} - {s00e00} - {t}" --def "animeFormat=/plex/Anime/{n}/{fn}" --def "movieFormat=/plex/Movies/{n} {y}/{n} {y}" --def "musicFormat=/plex/Music/{n}/{fn}" --def subtitles=en "ut_dir=$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL"
User avatar
rednoah
The Source
Posts: 23031
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Skip processing files with specific torrent label(s)?

Post by rednoah »

If you pass in --def ut_label=other the amc script will ignore all files passed in. There's more info in the docs.

Assuming $TORRENT_LABEL works correctly you can just set it in your torrent client and it should be passed along.
:idea: Please read the FAQ and How to Request Help.
User avatar
mrbucket101
Power User
Posts: 36
Joined: 02 Jul 2014, 00:25

Re: Skip processing files with specific torrent label(s)?

Post by mrbucket101 »

I think an easier solution would just to keep track of what files have been processed.

From the AMC sticky:

--def excludeList=amc-input.txt Keep a list of previously processed files to be ignored in future runs (if you run this script on the same files repeatedly you must enable this option)
User avatar
rednoah
The Source
Posts: 23031
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Skip processing files with specific torrent label(s)?

Post by rednoah »

mrbucket101 has a very good point! The exclude list feature is meant for to solve a different problem, but actually it might be exactly what you're looking for, since it'll prevent the script from processing the same file twice.
:idea: Please read the FAQ and How to Request Help.
Dresden
Posts: 5
Joined: 07 Feb 2015, 19:30

Re: Skip processing files with specific torrent label(s)?

Post by Dresden »

If you pass in --def ut_label=other the amc script will ignore all files passed in. There's more info in the docs.

Assuming $TORRENT_LABEL works correctly you can just set it in your torrent client and it should be passed along.
I'm not sure I followed you on that one... ut_label=$TORRENT_LABEL is already being passed. If I add ut_label=other, it'll ignore anything with the label of 'other'?

I apologize, but I can't find any 'docs', anywhere. I've scoured the main page and through many of your topics, but I couldn't find anything. Could you link me the docs?
I think an easier solution would just to keep track of what files have been processed.

From the AMC sticky:

--def excludeList=amc-input.txt Keep a list of previously processed files to be ignored in future runs (if you run this script on the same files repeatedly you must enable this option)
Thanks, I'll consider adding that. My issue extends beyond cross-seeding, though, even though that is the main reason I started this topic. I'm grabbing a bunch of freeleech torrents to boost my user class, and most of these movies are totally obscure, B-Rated, terrible movies I don't really want in my Plex, either. Being able to ignore based on label would solve all my issues.
User avatar
rednoah
The Source
Posts: 23031
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Skip processing files with specific torrent label(s)?

Post by rednoah »

You can force Movie/TV Show/Anime mode or force ignore files via labels, e.g. label as movie to force TheMovieDB, or tv to force TheTVDB, or anime to force AniDB, or other to ignore all files
@see viewtopic.php?f=4&t=215
:idea: Please read the FAQ and How to Request Help.
Dresden
Posts: 5
Joined: 07 Feb 2015, 19:30

Re: Skip processing files with specific torrent label(s)?

Post by Dresden »

I just solved for it outside the command line. The important thing to note is rTorrent won't pass labels with spaces in them. "Ratio Seeding" didn't work, but "Ratio_Seeding" does. I could have probably solved for this somehow through escaping them, but this was easier.

Code: Select all

#!/bin/bash

TORRENT_PATH=$1
TORRENT_NAME=$2
TORRENT_LABEL=$3


if [ "$TORRENT_LABEL" = "Ratio_Seeding" ]; then
   exit
else
   filebot -script fn:amc --output "/plex" --log-file amc.log --action symlink --conflict override -non-strict --def "seriesFormat=/plex/TV/{n}/{'Season '+s}/{n} - {s00e00} - {t}" --def "animeFormat=/plex/Anime/{n}/{'Season '+s}/{n} - {s00e00} - {t}" --def "movieFormat=/plex/Movies/{n} \({y}\)/{n} \({y}\)" --def "musicFormat=/plex/Music/{n}/{fn}" --def subtitles=en "ut_dir=$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL"
fi
Post Reply