Force "Anne with an E" via --filter

All your suggestions, requests and ideas for future development
Post Reply
phibins
Posts: 22
Joined: 28 Mar 2018, 02:49

Force "Anne with an E" via --filter

Post by phibins »

I have a show with the file name "anne.s01e01" (just for example) which get mismatched.

I want to force it to be matched with the show "Anne with an E".

How do i accomplish this.

Is it --filter (n != 'anne' || n == 'anne with an e')?

Where can i find information on the syntax?

I thought the || means "OR" and that '!=' means "NOT-EQUAL", but i have another filter that sets American Dad to always be S16 that looks like this:

(n != 'American Dad!' || s == 16)

So it looks like i might not be understanding the syntax for the filters here.. and assistance appriciated.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Force "Anne with an E" via --filter

Post by rednoah »

1.
The example you have given works out of the box:

Code: Select all

filebot -rename anne.s01e01.mkv --db TheTVDB --action TEST -non-strict --log INFO
[TEST] from [anne.s01e01.mkv] to [Anne with an E - 1x01 - Your Will Shall Decide Your Destiny.mkv]
:!: Please just post the specific file path you have trouble with, so I can give you a specific solution. Discussing --filter in a context where it's not necessary, won't be instructive to you or other users who may stumble upon this thread.



2.
For the sake of conversation, a --filter for this particular TV show would look like this:

Code: Select all

--filter "n == 'Anne with an E'"
e.g.

Code: Select all

filebot -rename anne.s01e01.mkv --db TheTVDB --action TEST -non-strict --log INFO --filter "n == 'Anne with an E'"
[TEST] from [anne.s01e01.mkv] to [Anne with an E - 1x01 - Your Will Shall Decide Your Destiny.mkv]


3.
Let's consider an example that really doesn't work:

Code: Select all

A100 ➔ Anne with an E 1x01
Naturally, this doesn't work, because FileBot can't figure out which show it might be:

Code: Select all

filebot -rename A100.mkv --db TheTVDB --action TEST -non-strict --log INFO
Failed to detect query for files: [A100.mkv]
Failed to match files to episode data
Adding --q 'Anne with an E' will fix that, bit it's still not working:

Code: Select all

filebot -rename A100.mkv --db TheTVDB --action TEST -non-strict --log INFO  --q 'Anne with an E'
[TEST] from [A100.mkv] to [Anne with an E - 3x04 - A Hope of Meeting You in Another World.mkv]
Now we use --filter to narrow down which Episode objects are allowed for matching:

Code: Select all

filebot -rename A100.mkv --db TheTVDB --action TEST -non-strict --log INFO  --q 'Anne with an E' --filter 'absolute == 1'
[TEST] from [A100.mkv] to [Anne with an E - 1x01 - Your Will Shall Decide Your Destiny.mkv]
:idea: Please read the FAQ and How to Request Help.
phibins
Posts: 22
Joined: 28 Mar 2018, 02:49

Re: Force "Anne with an E" via --filter

Post by phibins »

rednoah wrote: 15 Oct 2019, 01:49 :!: Please just post the specific file path you have trouble with, so I can give you a specific solution. Discussing --filter in a context where it's not necessary, won't be instructive to you or other users who may stumble upon this thread.
Thanks as always for your assistant RedNoah. Also let me know if I should make a new topic for this to keep everything uncluttered.

I see that the test function works for these. Which is why i am wondering why I got the following results (from the Historty XML):

Code: Select all

  <sequence date="2019-10-13T19:24:20.185-04:00">
        <rename dir="/media/PlexFiles/Media Backup/putio.py-master/Incomplete/20191013190501/Anne.S03E01.1080p.WEBRip.x264-aAF[rarbg]" from="Anne.S03E01.1080p.WEBRip.x264-aAF.eng.srt" to="/media/PlexFiles/Media Backup/TV Shows/Annedroids/Season 03/Annedroids - S03E01 - Reset.eng.srt"/>
        <rename dir="/media/PlexFiles/Media Backup/putio.py-master/Incomplete/20191013190501/Anne.S03E03.1080p.WEBRip.x264-aAF[rarbg]" from="Anne.S03E03.1080p.WEBRip.x264-aAF.eng.srt" to="/media/PlexFiles/Media Backup/TV Shows/Annedroids/Season 03/Annedroids - S03E03 - Paling Around.eng.srt"/>
        <rename dir="/media/PlexFiles/Media Backup/putio.py-master/Incomplete/20191013190501/Anne.S03E02.1080p.WEBRip.x264-aAF[rarbg]" from="Anne.S03E02.1080p.WEBRip.x264-aAF.mkv" to="/media/PlexFiles/Media Backup/TV Shows/Annedroids/Season 03/Annedroids - S03E02 - I, Android.mkv"/>
        <rename dir="/media/PlexFiles/Media Backup/putio.py-master/Incomplete/20191013190501/Anne.S03E01.1080p.WEBRip.x264-aAF[rarbg]" from="Anne.S03E01.1080p.WEBRip.x264-aAF.mkv" to="/media/PlexFiles/Media Backup/TV Shows/Annedroids/Season 03/Annedroids - S03E01 - Reset.mkv"/>
        <rename dir="/media/PlexFiles/Media Backup/putio.py-master/Incomplete/20191013190501/Anne.S03E03.1080p.WEBRip.x264-aAF[rarbg]" from="Anne.S03E03.1080p.WEBRip.x264-aAF.mkv" to="/media/PlexFiles/Media Backup/TV Shows/Annedroids/Season 03/Annedroids - S03E03 - Paling Around.mkv"/>
    </sequence>
using the following command:

Code: Select all

filebot -script fn:amc %inDir% --log ALL --output %outDir% --def minLengthMS=0 --action move --conflict auto -non-strict --filter \"(n != \'American Dad!\' || s == 16)\" --log-file amc.log --def clean=y music=y subtitles=en musicFormat=\"{plex}\" movieFormat="{plex}\" seriesFormat=\"{plex}\" minFileSize=4
And excuse the big `--log ALL` dump:

Code: Select all

Rename episodes using [TheTVDB]
Auto-detected query: [Anne]
Fetching episode data for [Mother (TR)]
Fetching episode data for [Anne+]
Fetching episode data for [Anone]
Fetching episode data for [Annedroids]
Fetching episode data for [Anne & Jake]
Apply filter [(n != 'American Dad!' || s == 16)] on [111] items
Include [Mother (TR) - 1x01 - null]
Include [Mother (TR) - 1x02 - null]
Include [Mother (TR) - 1x03 - null]
Include [Mother (TR) - 1x04 - null]
Include [Mother (TR) - 1x05 - null]
Include [Mother (TR) - 1x06 - null]
Include [Mother (TR) - 1x07 - null]
Include [Mother (TR) - 1x08 - null]
Include [Mother (TR) - 1x09 - null]
Include [Mother (TR) - 1x10 - null]
Include [Mother (TR) - 1x11 - null]
Include [Mother (TR) - 1x12 - null]
Include [Mother (TR) - 1x13 - null]
Include [Mother (TR) - 1x14 - null]
Include [Mother (TR) - 1x15 - null]
Include [Mother (TR) - 1x16 - null]
Include [Mother (TR) - 1x17 - null]
Include [Mother (TR) - 1x18 - null]
Include [Mother (TR) - 1x19 - null]
Include [Mother (TR) - 1x20 - null]
Include [Mother (TR) - 1x21 - null]
Include [Mother (TR) - 1x22 - null]
Include [Mother (TR) - 1x23 - null]
Include [Mother (TR) - 1x24 - null]
Include [Mother (TR) - 1x25 - null]
Include [Mother (TR) - 1x26 - null]
Include [Mother (TR) - 1x27 - null]
Include [Mother (TR) - 1x28 - null]
Include [Mother (TR) - 1x29 - null]
Include [Mother (TR) - 1x30 - null]
Include [Mother (TR) - 1x31 - null]
Include [Mother (TR) - 1x32 - null]
Include [Mother (TR) - 1x33 - null]
Include [Anne+ - 1x01 - Aflevering 1: ANNE+ Lily]
Include [Anne+ - 1x02 - Aflevering 2: ANNE+ Janna]
Include [Anne+ - 1x03 - Aflevering 3: ANNE+ Sofie]
Include [Anne+ - 1x04 - Aflevering 4: ANNE+ Esther]
Include [Anne+ - 1x05 - Aflevering 5: ANNE+ Sara]
Include [Anne+ - 1x06 - Aflevering 6: ANNE+]
Include [Anne+ - Special 1 - Teaser]
Include [Anne+ - Special 3 - Trailer]
Include [Anne+ - Special 2 - Behind the Scenes -ELINE VAN GILS]
Include [Anone - 1x01 - Episode 1]
Include [Anone - 1x02 - Episode 2]
Include [Anone - 1x03 - Episode 3]
Include [Anone - 1x04 - Episode 4]
Include [Anone - 1x05 - Episode 5]
Include [Anone - 1x06 - Episode 6]
Include [Anone - 1x07 - Episode 7]
Include [Anone - 1x08 - Episode 8]
Include [Anone - 1x09 - Episode 9]
Include [Anone - 1x10 - Episode 10]
Include [Annedroids - 1x01 - New Pals]
Include [Annedroids - 1x02 - Pal n' Go Seek]
Include [Annedroids - 1x03 - Reduce, Reuse, Robocycle]
Include [Annedroids - 1x04 - Helping Hand]
Include [Annedroids - 1x05 - Garbage Band]
Include [Annedroids - 1x06 - Eyes Up]
Include [Annedroids - 1x07 - Junkyard Sleepover]
Include [Annedroids - 1x08 - Pal in the Middle]
Include [Annedroids - 1x09 - Android's Best Friend]
Include [Annedroids - 1x10 - The Power of Love]
Include [Annedroids - 1x11 - Electromagnetic Pal]
Include [Annedroids - 1x12 - Out of Hand]
Include [Annedroids - 1x13 - Eyes On the Skies]
Include [Annedroids - 2x01 - Message in a Rocket]
Include [Annedroids - 2x02 - Undercover Pigeon]
Include [Annedroids - 2x03 - Experiments in Babysitting]
Include [Annedroids - 2x04 - Parent Swap]
Include [Annedroids - 2x05 - An Android Space Odyssey]
Include [Annedroids - 2x06 - Zack Bot]
Include [Annedroids - 2x07 - Junkyard CSI]
Include [Annedroids - 2x08 - Jurassic Junkyard]
Include [Annedroids - 2x09 - Costume Pal]
Include [Annedroids - 2x10 - Broken Hand]
Include [Annedroids - 2x11 - Lights! Camera! Volcano!]
Include [Annedroids - 2x12 - Annebots]
Include [Annedroids - 2x13 - Family Matter]
Include [Annedroids - 3x01 - Reset]
Include [Annedroids - 3x02 - I, Android]
Include [Annedroids - 3x03 - Paling Around]
Include [Annedroids - 3x04 - The Escape Artist]
Include [Annedroids - 3x05 - For Art's sake]
Include [Annedroids - 3x06 - Teacher's Pal]
Include [Annedroids - 3x07 - Haunted Junkyard]
Include [Annedroids - 3x08 - Robo Mutt]
Include [Annedroids - 3x09 - Broken Parts]
Include [Annedroids - 3x10 - Bugged Out]
Include [Annedroids - 3x11 - Map Quest]
Include [Annedroids - 3x12 - Bionic Grandma]
Include [Annedroids - 3x13 - Friendiversary]
Include [Annedroids - 4x01 - Operation Pal]
Include [Annedroids - 4x02 - Dumpster Diving]
Include [Annedroids - 4x03 - Enemy Lines]
Include [Annedroids - 4x04 - Flying the Cooper]
Include [Annedroids - 4x05 - Palception]
Include [Annedroids - 4x06 - Wilderness Tech (1)]
Include [Annedroids - 4x07 - Wilderness Tech (2)]
Include [Annedroids - 4x08 - Search Party]
Include [Annedroids - 4x09 - ThermoDad]
Include [Annedroids - 4x10 - Forces of Nurture]
Include [Annedroids - 4x11 - Growth Spurt]
Include [Annedroids - 4x12 - Mother of Invention (1)]
Include [Annedroids - 4x13 - Mother of Invention (2)]
Include [Anne & Jake - 1x01 - Let's Do The Time Warp]
Include [Anne & Jake - 1x02 - What The?!?]
Include [Anne & Jake - 1x03 - Breeches!]
Include [Anne & Jake - 1x04 - This Just In...]
Include [Anne & Jake - 1x05 - Shhh!]
Include [Anne & Jake - 1x06 - Bar-b-key]
Include [Anne & Jake - 1x07 - Run!]
Auto-detected query: [Anne]
Fetching episode data for [Mother (TR)]
Fetching episode data for [Anne+]
Fetching episode data for [Anone]
Fetching episode data for [Annedroids]
Fetching episode data for [Anne & Jake]
Apply filter [(n != 'American Dad!' || s == 16)] on [111] items
Include [Mother (TR) - 1x01 - null]
Include [Mother (TR) - 1x02 - null]
Include [Mother (TR) - 1x03 - null]
Include [Mother (TR) - 1x04 - null]
Include [Mother (TR) - 1x05 - null]
Include [Mother (TR) - 1x06 - null]
Include [Mother (TR) - 1x07 - null]
Include [Mother (TR) - 1x08 - null]
Include [Mother (TR) - 1x09 - null]
Include [Mother (TR) - 1x10 - null]
Include [Mother (TR) - 1x11 - null]
Include [Mother (TR) - 1x12 - null]
Include [Mother (TR) - 1x13 - null]
Include [Mother (TR) - 1x14 - null]
Include [Mother (TR) - 1x15 - null]
Include [Mother (TR) - 1x16 - null]
Include [Mother (TR) - 1x17 - null]
Include [Mother (TR) - 1x18 - null]
Include [Mother (TR) - 1x19 - null]
Include [Mother (TR) - 1x20 - null]
Include [Mother (TR) - 1x21 - null]
Include [Mother (TR) - 1x22 - null]
Include [Mother (TR) - 1x23 - null]
Include [Mother (TR) - 1x24 - null]
Include [Mother (TR) - 1x25 - null]
Include [Mother (TR) - 1x26 - null]
Include [Mother (TR) - 1x27 - null]
Include [Mother (TR) - 1x28 - null]
Include [Mother (TR) - 1x29 - null]
Include [Mother (TR) - 1x30 - null]
Include [Mother (TR) - 1x31 - null]
Include [Mother (TR) - 1x32 - null]
Include [Mother (TR) - 1x33 - null]
Include [Anne+ - 1x01 - Aflevering 1: ANNE+ Lily]
Include [Anne+ - 1x02 - Aflevering 2: ANNE+ Janna]
Include [Anne+ - 1x03 - Aflevering 3: ANNE+ Sofie]
Include [Anne+ - 1x04 - Aflevering 4: ANNE+ Esther]
Include [Anne+ - 1x05 - Aflevering 5: ANNE+ Sara]
Include [Anne+ - 1x06 - Aflevering 6: ANNE+]
Include [Anne+ - Special 1 - Teaser]
Include [Anne+ - Special 3 - Trailer]
Include [Anne+ - Special 2 - Behind the Scenes -ELINE VAN GILS]
Include [Anone - 1x01 - Episode 1]
Include [Anone - 1x02 - Episode 2]
Include [Anone - 1x03 - Episode 3]
Include [Anone - 1x04 - Episode 4]
Include [Anone - 1x05 - Episode 5]
Include [Anone - 1x06 - Episode 6]
Include [Anone - 1x07 - Episode 7]
Include [Anone - 1x08 - Episode 8]
Include [Anone - 1x09 - Episode 9]
Include [Anone - 1x10 - Episode 10]
Include [Annedroids - 1x01 - New Pals]
Include [Annedroids - 1x02 - Pal n' Go Seek]
Include [Annedroids - 1x03 - Reduce, Reuse, Robocycle]
Include [Annedroids - 1x04 - Helping Hand]
Include [Annedroids - 1x05 - Garbage Band]
Include [Annedroids - 1x06 - Eyes Up]
Include [Annedroids - 1x07 - Junkyard Sleepover]
Include [Annedroids - 1x08 - Pal in the Middle]
Include [Annedroids - 1x09 - Android's Best Friend]
Include [Annedroids - 1x10 - The Power of Love]
Include [Annedroids - 1x11 - Electromagnetic Pal]
Include [Annedroids - 1x12 - Out of Hand]
Include [Annedroids - 1x13 - Eyes On the Skies]
Include [Annedroids - 2x01 - Message in a Rocket]
Include [Annedroids - 2x02 - Undercover Pigeon]
Include [Annedroids - 2x03 - Experiments in Babysitting]
Include [Annedroids - 2x04 - Parent Swap]
Include [Annedroids - 2x05 - An Android Space Odyssey]
Include [Annedroids - 2x06 - Zack Bot]
Include [Annedroids - 2x07 - Junkyard CSI]
Include [Annedroids - 2x08 - Jurassic Junkyard]
Include [Annedroids - 2x09 - Costume Pal]
Include [Annedroids - 2x10 - Broken Hand]
Include [Annedroids - 2x11 - Lights! Camera! Volcano!]
Include [Annedroids - 2x12 - Annebots]
Include [Annedroids - 2x13 - Family Matter]
Include [Annedroids - 3x01 - Reset]
Include [Annedroids - 3x02 - I, Android]
Include [Annedroids - 3x03 - Paling Around]
Include [Annedroids - 3x04 - The Escape Artist]
Include [Annedroids - 3x05 - For Art's sake]
Include [Annedroids - 3x06 - Teacher's Pal]
Include [Annedroids - 3x07 - Haunted Junkyard]
Include [Annedroids - 3x08 - Robo Mutt]
Include [Annedroids - 3x09 - Broken Parts]
Include [Annedroids - 3x10 - Bugged Out]
Include [Annedroids - 3x11 - Map Quest]
Include [Annedroids - 3x12 - Bionic Grandma]
Include [Annedroids - 3x13 - Friendiversary]
Include [Annedroids - 4x01 - Operation Pal]
Include [Annedroids - 4x02 - Dumpster Diving]
Include [Annedroids - 4x03 - Enemy Lines]
Include [Annedroids - 4x04 - Flying the Cooper]
Include [Annedroids - 4x05 - Palception]
Include [Annedroids - 4x06 - Wilderness Tech (1)]
Include [Annedroids - 4x07 - Wilderness Tech (2)]
Include [Annedroids - 4x08 - Search Party]
Include [Annedroids - 4x09 - ThermoDad]
Include [Annedroids - 4x10 - Forces of Nurture]
Include [Annedroids - 4x11 - Growth Spurt]
Include [Annedroids - 4x12 - Mother of Invention (1)]
Include [Annedroids - 4x13 - Mother of Invention (2)]
Include [Anne & Jake - 1x01 - Let's Do The Time Warp]
Include [Anne & Jake - 1x02 - What The?!?]
Include [Anne & Jake - 1x03 - Breeches!]
Include [Anne & Jake - 1x04 - This Just In...]
Include [Anne & Jake - 1x05 - Shhh!]
Include [Anne & Jake - 1x06 - Bar-b-key]
Include [Anne & Jake - 1x07 - Run!]
[MOVE] from [/media/PlexFiles/Media Backup/putio.py-master/Incomplete/20191013190501/Anne.S03E01.1080p.WEBRip.x264-aAF[rarbg]/Anne.S03E01.1080p.WEBRip.x264-aAF.eng.srt] to [/media/PlexFiles/Media Backup/TV Shows/Annedroids/Season 03/Annedroids - S03E01 - Reset.eng.srt]
[MOVE] from [/media/PlexFiles/Media Backup/putio.py-master/Incomplete/20191013190501/Anne.S03E03.1080p.WEBRip.x264-aAF[rarbg]/Anne.S03E03.1080p.WEBRip.x264-aAF.eng.srt] to [/media/PlexFiles/Media Backup/TV Shows/Annedroids/Season 03/Annedroids - S03E03 - Paling Around.eng.srt]
[MOVE] from [/media/PlexFiles/Media Backup/putio.py-master/Incomplete/20191013190501/Anne.S03E02.1080p.WEBRip.x264-aAF[rarbg]/Anne.S03E02.1080p.WEBRip.x264-aAF.mkv] to [/media/PlexFiles/Media Backup/TV Shows/Annedroids/Season 03/Annedroids - S03E02 - I, Android.mkv]
[MOVE] from [/media/PlexFiles/Media Backup/putio.py-master/Incomplete/20191013190501/Anne.S03E01.1080p.WEBRip.x264-aAF[rarbg]/Anne.S03E01.1080p.WEBRip.x264-aAF.mkv] to [/media/PlexFiles/Media Backup/TV Shows/Annedroids/Season 03/Annedroids - S03E01 - Reset.mkv]
[MOVE] from [/media/PlexFiles/Media Backup/putio.py-master/Incomplete/20191013190501/Anne.S03E03.1080p.WEBRip.x264-aAF[rarbg]/Anne.S03E03.1080p.WEBRip.x264-aAF.mkv] to [/media/PlexFiles/Media Backup/TV Shows/Annedroids/Season 03/Annedroids - S03E03 - Paling Around.mkv]
Processed 5 files
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Force "Anne with an E" via --filter

Post by rednoah »

IDK. Make sure you keep the logs so we can investigate next time it happens.


:idea: I'm using the latest revision. Chances are, the latest revision just work betters.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Force "Anne with an E" via --filter

Post by rednoah »

Note that since the correct show isn't even considered in the first place, it can't work:

Code: Select all

Fetching episode data for [Mother (TR)]
Fetching episode data for [Anne+]
Fetching episode data for [Anone]
Fetching episode data for [Annedroids]
Fetching episode data for [Anne & Jake]
In strict mode, it would fail. In non-strict mode, it'll pick the "best result" which is still utterly wrong in absence of the correction result being an option. --filter doesn't do anything here, since that simply removes Episode objects from consideration, but can't add additional episode lists into consideration.
:idea: Please read the FAQ and How to Request Help.
phibins
Posts: 22
Joined: 28 Mar 2018, 02:49

Re: Force "Anne with an E" via --filter

Post by phibins »

rednoah wrote: 16 Oct 2019, 14:24 IDK. Make sure you keep the logs so we can investigate next time it happens.


I edited the post above to include the --log ALL output.
:idea: I'm using the latest revision. Chances are, the latest revision just work betters.
I guess thats a good idea. I am on 4.8.5 tho...

I'll just chalk this up to a random glitch if you dont have any idea of why that happened.

Thanks again.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Force "Anne with an E" via --filter

Post by rednoah »

There's weekly builds you can try:
viewtopic.php?f=7&t=1609

The next release is scheduled for October, so the latest revision contains many improvements that were added since the previous release half a year ago.
:idea: Please read the FAQ and How to Request Help.
phibins
Posts: 22
Joined: 28 Mar 2018, 02:49

Re: Force "Anne with an E" via --filter

Post by phibins »

Thank you, I will use the weekly.
Post Reply