AMC process only file with specific labels

Any questions? Need some help?
Post Reply
spaceman321
Posts: 4
Joined: 29 Apr 2017, 14:08

AMC process only file with specific labels

Post by spaceman321 »

I am attempting to setup my torrent client to run the filebot AMC script only on downloads with specified labels. So far i have attempted to use the --filter command with no luck. I have the following command running in qBitorrent:

Code: Select all

filebot -script fn:amc --output "D:/My Videos/Movies" --action duplicate -non-strict --log-file amc.log --def unsorted=y artwork=y clean=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"  --filter "ut_label=Movie" || "ut_label=TV" 
for troubleshooting i ran the following, dry-run as suggested in the AMC instructions:

Code: Select all

filebot -script fn:amc --output "D:/My Videos/Movies" --action test -non-strict --log-file amc.log --def unsorted=y artwork=y clean=y "ut_label=unspecified" "D:\Downloads\Torrents\Complete\Movie"  --filter "ut_label=Movie" || "ut_label=TV" 
the command line appears to process the file, print 'failure' (which i believe is true of all dry-runs) and then tells me it doesn't recognise "ut_label=TV" . Does where i put the filter matter? does appending it to the original command only apply it after its already done its work?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC process only file with specific labels

Post by rednoah »

By default, if you set the label to any one of these values, then files will be excluded from series / movie processing:

Code: Select all

games|ebook|other|ignore
You can also use the --def ignore option to exclude files (e.g. files in a certain folder). You won't be able to call or not call filebot based on the label, unless you create your own wrapper script that checks label takes care of that logic.
:idea: Please read the FAQ and How to Request Help.
spaceman321
Posts: 4
Joined: 29 Apr 2017, 14:08

Re: AMC process only file with specific labels

Post by spaceman321 »

Okay, i will forget about the filter then. Thats just what i needed thanks.
spaceman321
Posts: 4
Joined: 29 Apr 2017, 14:08

Re: AMC process only file with specific labels

Post by spaceman321 »

It's taken me a long time to get back to taking a look at this, but the suggestion that setting the label to games|ebook|other|ignore, means that it will ignore the file doesn't appear to be the case. I am still seeing all files processed and duplicated despite having tried to label with each of the aformentioned labels.

I am wondering if this is because it loses this label once it has been duplicated? it would also explain why your other suggestion of the -def ignore didn't work, as by the time it performs the postprocess, it has been duplicated in the output directory, and it is no longer trying to process the version that is in its 'input' directory. This could all be rubbish of course, but i'd like to get this right :).
Last edited by spaceman321 on 19 Nov 2017, 14:49, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC process only file with specific labels

Post by rednoah »

1.
The --def ut_label option is used for auto-detection, and any of the aforementioned labels will force all files into the Unsorted category, which may or may not be processed in some way depending on your --def unsorted option.

@see viewtopic.php?f=4&t=5490#p31204


2.
The only way to ignore files is by using the --def ignore option to match all files you want to ignore. However, I'd recommend simply not calling the amc script at all if certain conditions are met in your own glue logic script.
:idea: Please read the FAQ and How to Request Help.
spaceman321
Posts: 4
Joined: 29 Apr 2017, 14:08

Re: AMC process only file with specific labels

Post by spaceman321 »

1. When you say auto-detection, do you mean just by the script to decide where to go when trying to match the name? and that it has nothing to do with ignoring the file passed in?
2. What do you mean by all files you want to ignore? i thought that's what i was doing, based on ignoring a specified sub-directory, which qbitorrent creates based on the label it is assigned.

As i am using qbittorrent, and it is advised to call the utorrent_postprocess.pyw, i guess that would be a god place to place conditions on what to run based on the label?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC process only file with specific labels

Post by rednoah »

1.
If you specify --def ut_label=other then files will not be identified as movie/episode/etc and thus not be processed, UNLESS you also specify --def unsorted=y in which case these files will be process as Unsorted files.


2.
If you have a common sub-directory for files you want to ignore, then you can use the --def ignore=regex option which ignores files right away.

e.g. ignore any and all files where "folder" is part of the file path:

Code: Select all

--def ignore=folder
This will add a ignore rule to the beginning of the script where it selects all the files for processing and you will see additional output logging:

Code: Select all

Ignore pattern: /path/to/folder/file
and the process will end immediately with:

Code: Select all

No files selected for processing
:idea: Please read the FAQ and How to Request Help.
Post Reply