AMC - Defining precedence in cases of ambiguity

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
elcaron
Posts: 9
Joined: 04 Oct 2015, 21:01

AMC - Defining precedence in cases of ambiguity

Post by elcaron »

Hi, I started to use filebot with AMC as a postprocessing script in pyload. Most stuff works fine, however, the non-strict mode has fucked up quite a few things big time for me. I can, for example, vividly remember renaming a whole season of M*A*S*H back from some strange children's TV series.
The strict mode, on the other hand, quits pretty often because of ambiguities.

The solution seems easy to me: Define a list of shows (probably doesn't make too much sense for movies) that can be expected. I might download Family Guy, I will most probably never download Family Gun (why is that even an ambiguity when Family Guy is contained in the filename?).
Is there such a possibility?
Also, is there a CLI option to specify a match in case of ambiguity, instead of selecting non-strict and having it figure everything out? I think of something like doing one strict run that gives the possible option and then a run that specifies which option I want to take.

Sorry if this is a basic question, but I could really find anything on this ... other just seem to be content with the non-strict option.
User avatar
rednoah
The Source
Posts: 23934
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC - Defining precedence in cases of ambiguity

Post by rednoah »

1.
Find any mismatches? Send me the logs and/or filenames so I can fix it.


2.
See Advanced Fine-Tuning. The age filter should be the best/easiest solution for most. But the --filter option is perfectly capable of acting as a whitelist (or blacklist) for TV Shows as well.

Some docs:
viewtopic.php?f=3&t=2127

Many individual examples, some of which may be useful to you:
search.php?keywords=filter

skullzy has put quite some thought into his setup (and how to use labels and --filter) so you might be able to get some ideas from this thread:
viewtopic.php?f=4&t=2752#p16550
:idea: Please read the FAQ and How to Request Help.
elcaron
Posts: 9
Joined: 04 Oct 2015, 21:01

Re: AMC - Defining precedence in cases of ambiguity

Post by elcaron »

Thanks for the quick answer. Unfortunately I think I don't have most of the filenames anymore. Family.Guy.S14E02.REAL.720p.HDTV.x264-KILLERS.mkv wasn't renames in strict mode because of a conflict with Family Gun.

I'll have a look into the VBScript (I am on Linux myself). It looks like filter is only used for the age, though?

I didn't quite see what kind of code can be set in the filter option. Would the != easily work with the row-wise content of a file somehow?
User avatar
rednoah
The Source
Posts: 23934
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC - Defining precedence in cases of ambiguity

Post by rednoah »

1.
--filter supports any Groovy code, and provides all the episode bindings you already know from the --format.

The most simple filter would be --filter "true" so you build up your condition from there.

I recommend playing with age filter and labels first, because that can be automated quite easily.


2.
If you want a white/black list you can just adapt things from here:
viewtopic.php?f=5&t=182

e.g.

Code: Select all

--filter "csv('/path/to/white-list.csv').get(n) == 'yes'"

Code: Select all

Firefly;yes
Alias;yes
...
But maintaining a whitelist such as this seems like a lot of unnecessary manual work.
:idea: Please read the FAQ and How to Request Help.
elcaron
Posts: 9
Joined: 04 Oct 2015, 21:01

Re: AMC - Defining precedence in cases of ambiguity

Post by elcaron »

Thanks a lot. I don't think age works for me. I am currently watching House of Cards UK, may download another season of MASH and so on. On the other and, I am not downloading hundreds of different series, so I don't see how a whitelist would be much work. Problaby combined with a test if there is a season number to accept any movie.
User avatar
rednoah
The Source
Posts: 23934
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC - Defining precedence in cases of ambiguity

Post by rednoah »

1.
That's why applying the age filter for certain labels only makes sense:
viewtopic.php?f=8&t=2877#p16509

2.
In your case, a simple age filter should work just fine, and won't require you to maintain a whitelist:
viewtopic.php?f=3&t=2127


This is what you want:

Code: Select all

--filter "age < 7 || !model.any{ it.age < 7 }"
If you're anything like a typical user, then this will fix all issues you might run into.
:idea: Please read the FAQ and How to Request Help.
elcaron
Posts: 9
Joined: 04 Oct 2015, 21:01

Re: AMC - Defining precedence in cases of ambiguity

Post by elcaron »

Hm, ok, I'll try that. At the moment I don't have much luck with filters at all, though. Tyring a simple name filter even doesn't work for me:

Code: Select all

filebot -r -script fn:amc \
        --output /media/dataext \
        --log-file /media/dataext/amc.log \
        --action copy \
        --conflict auto \
        --filter "!n.contains('2009')" \
        --lang de $1 \
        --def \
                'exec=chmod 770 -R "{folder}";chgrp data-video -R "{folder}"' \
                subtitles=en \
                skipExtract=y \
                artwork=n \
                clean=y \
                root=y \
                "seriesFormat=/media/dataext/video/Series/{n}/Season {s.pad(2)}/{n.space('.')}.{'S'+s.pad(2)}E{e.pad(2)}.{t.space('.')}.{vf}.{source}.{group}" \
                "movieFormat=/media/dataext/video/Movies/{n}.{y}.{vf}.{source}.{group}"


gives me

Code: Select all

Locking /media/dataext/amc.log
Run script [fn:amc] at [Sat Oct 10 16:02:30 CEST 2015]
Parameter: exec = chmod 770 -R "{folder}";chgrp data-video -R "{folder}"
Parameter: subtitles = en
Parameter: skipExtract = y
Parameter: artwork = n
Parameter: clean = y
Parameter: root = y
Parameter: seriesFormat = /media/dataext/video/Series/{n}/Season {s.pad(2)}/{n.space('.')}.{'S'+s.pad(2)}E{e.pad(2)}.{t.space('.')}.{vf}.{source}.{group}
Parameter: movieFormat = /media/dataext/video/Movies/{n}.{y}.{vf}.{source}.{group}
Argument: /media/dataext/video/Downloads/download.serienjunkies.org_f-5433ceb006b063f9_ul_Wer-720-903.html
Input: /media/dataext/video/Downloads/download.serienjunkies.org_f-5433ceb006b063f9_ul_Wer-720-903.html/Wer-720-903/doctor.who.2005.s09e03.720p.hdtv.x264-tla.mkv
Group: [tvs:doctor who 2005] => [doctor.who.2005.s09e03.720p.hdtv.x264-tla.mkv]
Get [English] subtitles for 1 files
CmdlineException: OpenSubtitles: Please enter your login details by calling `filebot -script fn:configure`
Rename episodes using [TheTVDB]
Auto-detected query: [doctor who 2005]
CmdlineException: Multiple options: Force auto-select requires non-strict matching: [Doctor Who (2005), Doctor Who (2009)]
Finished without processing any files
Failure (°_°)
User avatar
rednoah
The Source
Posts: 23934
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC - Defining precedence in cases of ambiguity

Post by rednoah »

--filter is applied to each episode, not each TV series. You still need -non-strict, but your --filter will make sure that only Doctor Who (2009) episodes will be considered for matching.
:idea: Please read the FAQ and How to Request Help.
elcaron
Posts: 9
Joined: 04 Oct 2015, 21:01

Re: AMC - Defining precedence in cases of ambiguity

Post by elcaron »

Ok, thanks. I thought this would already reduce the line "CmdlineException: Multiple options: Force auto-select requires non-strict matching: [Doctor Who (2005), Doctor Who (2009)]".

BTW, 2009 is what I DON'T want. 2009 is some fan project while 2005 is the curretnly running bbc series :)
User avatar
rednoah
The Source
Posts: 23934
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC - Defining precedence in cases of ambiguity

Post by rednoah »

Sorry, forgot about that !not there. Basically --filter works on episode data because that makes things much more flexible, and things like the per-episode age filter possible.
:idea: Please read the FAQ and How to Request Help.
Post Reply