--filter and fine-tuning

How-to guides, frequently asked questions, not-so-obvious features, etc
Post Reply
User avatar
rednoah
The Source
Posts: 11700
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

--filter and fine-tuning

Post by rednoah » 27 Oct 2014, 20:54

Description:

The --filter option is probably the the most powerful, yet least used option the CLI has to offer. As long as everything "just works" you will never need --filter but if you get mismatches then --filter will allow you to pass in arbitrary rules to help FileBot make the correct match. Plus, once you're familiar with format expressions you'll immediately get filter expressions.

The --filter expression allows you to control which episode or movie object is considered for matching. So if one show is confused with another due to bad naming or missing data you can simply exclude the bad one.

Image

Examples:

If you only process recently aired episodes you could exclude any episode of any show that has been aired more than a few days ago, immediately eliminating any and all potential mismatches with similarly named TV Shows aired at different times.

Code: Select all

--filter "age < 7"
A more advanced version of the above might only include episode data of recently aired episodes if there are any recently aired episodes, but otherwise default to accepting any episode data.

Code: Select all

--filter "age < 7 || !model.any{ it.age < 7 }"
If misleading data from a specific series is making trouble you can simply exclude it.

Code: Select all

--filter "n != /Doctor Who/"
You can manage your list of explicitly excluded (or included) shows with an external text file.

Code: Select all

--filter "!readLines('/path/to/excludes.txt').contains(n)"

Since filter expressions allow arbitrary code, you can come up with more smart or more specialized logic yourself. Feel free to share. ;)
My (very excellent) support depends on Windows Store and Mac App Store sales and PayPal donations. Paying users, donors and everyone who contributes to FileBot in one way or another will get the very best support.

Image

Please read the FAQ and How to Request Help. Donate if you'd like some extra developer love. :ugeek:

Laynezilla
Posts: 1
Joined: 25 Apr 2017, 04:27

Re: --filter and fine-tuning

Post by Laynezilla » 25 Apr 2017, 04:29

Is there a complete list of filters anywhere?

User avatar
rednoah
The Source
Posts: 11700
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: --filter and fine-tuning

Post by rednoah » 25 Apr 2017, 05:44

:idea: The number of possible filters is infinite. The available bindings (n, y, s, etc) are the same as in format expressions.

What's the problem? What are you trying to accomplish?
My (very excellent) support depends on Windows Store and Mac App Store sales and PayPal donations. Paying users, donors and everyone who contributes to FileBot in one way or another will get the very best support.

Image

Please read the FAQ and How to Request Help. Donate if you'd like some extra developer love. :ugeek:

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests