Explicitly ignoring or making explicit matches

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
timmotee
Posts: 9
Joined: 11 Mar 2018, 15:13

Explicitly ignoring or making explicit matches

Post by timmotee »

There are a few TV shows that I have that consistently match incorrectly. For example, "Into the Dark" files are matched by "Dark" 100% of the time. Is there a reasonably easy way to prevent this in my script? I know it's probably information already in this forum, but I wasn't able to piece it together. It's automated with RSS and filebot script executed by deluge, so by the time I see something has downloaded, the scripts have already picked it up and propagated it across to all its destination directory and sync partners. A second example is that "The Chilling Adventures of Sabrina" is matched with "The Adventures of Spot".

Here's the script as it is execute from my log:

Code: Select all

filebot -script /opt/filebot/amc.groovy -non-strict --def ut_kind=multi --log all --log-file amc.log --def ut_dir="/torrents/data/Into.The.Dark.2018.S01E08.All.That.We.Destroy.WEBRip.x264-TBS[ettv]" --output ~/media/New/ --action copy --conflict override --def subtitles=en --def artwork=false --def extractfolder=/torrents/extracted --def skipExtract=n --def music=y --encoding utf8 --def minFileSize=0
And here's the entry from amc.log

Code: Select all

Input: /torrents/data/Into.The.Dark.2018.S01E08.All.That.We.Destroy.WEBRip.x264-TBS[ettv]/into.the.dark.2018.s01e08.all.that.we.destroy.webrip.x264-tbs[ettv].mkv
Group: [tvs:dark] => [into.the.dark.2018.s01e08.all.that.we.destroy.webrip.x264-tbs[ettv].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: [DARK, into the dark 2018]
Fetching episode data for [DARK]
Fetching episode data for [Ark]
Fetching episode data for [Dark Net]
Fetching episode data for [Darkroom]
Fetching episode data for [Dark Side]
Fetching episode data for [Into the West]
Fetching episode data for [In The Dark]
Fetching episode data for [Shot in the Dark]
[COPY] From [/torrents/data/Into.The.Dark.2018.S01E08.All.That.We.Destroy.WEBRip.x264-TBS[ettv]/into.the.dark.2018.s01e08.all.that.we.destroy.webrip.x264-tbs[ettv].mkv] to [/media/New/TV Shows/DARK/Season 01/DARK - S01E08 - As You Sow, so You Shall Reap.mkv]
Processed 1 files
Done
User avatar
rednoah
The Source
Posts: 22990
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Explicitly ignoring or making explicit matches

Post by rednoah »

I'd look into the --filter option. There are many conceivable --filter approaches, and depending on your exact use case some will work better than others.

The amc manual includes one possible approach that should work fairly well for the majority of use cases.

:!: Note that the correct series option isn't listed in the log at all. Maybe it's listed with a different name on TheTVDB?
:idea: Please read the FAQ and How to Request Help.
timmotee
Posts: 9
Joined: 11 Mar 2018, 15:13

Re: Explicitly ignoring or making explicit matches

Post by timmotee »

Got it, you've pointed me in the right direction to better understand this one scenario:

Code: Select all

Auto-detected query: [DARK, into the dark 2018]
So I'm guessing because we don't want to include the search terms "into" and "the" most of the time, it drops those two words? Then when searching DARK, it just doesn't come up.

I'm not sure it would be a job for filters then; would there be a way to say: if [filename]==*into.the.dark* then make the search term the TVDB ID(347115), or "INTO THE DARK"?
User avatar
rednoah
The Source
Posts: 22990
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Explicitly ignoring or making explicit matches

Post by rednoah »

1.
Please run filebot -script fn:sysinfo and post the output.


2.
Here's what I get:

Code: Select all

Input: into.the.dark.2018.s01e08.all.that.we.destroy.webrip.x264-tbs[ettv].mkv
Group: [Series:true] => [into.the.dark.2018.s01e08.all.that.we.destroy.webrip.x264-tbs[ettv].mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Into the Dark 2018]
Fetching episode data for [Into the Dark]
[TEST] from [into.the.dark.2018.s01e08.all.that.we.destroy.webrip.x264-tbs[ettv].mkv] to [TV Shows/Into the Dark/Season 01/Into the Dark - S01E08 - All That We Destroy.mkv]
Processed 1 files

3.
timmotee wrote: 13 May 2019, 07:21 would there be a way to say: if [filename]==*into.the.dark* then make the search term the TVDB ID(347115), or "INTO THE DARK"?
AFAIK, there's no way to hook into FileBot on that level at runtime. Adding *.nfo files with TheTVDB ID or adding xattr with TheTVDB ID could be done as a separate pre-processing step though.
:idea: Please read the FAQ and How to Request Help.
timmotee
Posts: 9
Joined: 11 Mar 2018, 15:13

Re: Explicitly ignoring or making explicit matches

Post by timmotee »

Oh, that is weird. Here is me:

Code: Select all

===================================================
FileBot 4.7.8 (r4846)
JNA Native: 5.1.0
MediaInfo: 0.7.92.1
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
GVFS: groovy.lang.MissingPropertyException: No such property: net for class: Script1
Possible solutions: now, log, _def
Script Bundle: 2018-03-16 (r516)
Groovy: 2.4.8
JRE: OpenJDK Runtime Environment 1.8.0_191
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 6 Core / 455 MB Max Memory / 19 MB Used Memory
OS: Linux (amd64)
Package: DEB
uname: Linux gaia.bysh.me 4.15.0-47-generic #50~16.04.1-Ubuntu SMP Fri Mar 15 16:06:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

------------------- UPDATE AVAILABLE: FileBot 4.8.5 (r6224) --------------------
User avatar
rednoah
The Source
Posts: 22990
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Explicitly ignoring or making explicit matches

Post by rednoah »

Looks like you're using a very outdated build. Might work. Might work less well. IDK. Not much I can do to fix builds from 2-3 years ago.

You can install the latest builds via our new apt repository:
https://www.filebot.net/linux/apt.html
:idea: Please read the FAQ and How to Request Help.
timmotee
Posts: 9
Joined: 11 Mar 2018, 15:13

Re: Explicitly ignoring or making explicit matches

Post by timmotee »

Message received. I'm on a managed appbox. I will ask to see if an update can be supported.

Thanks for looking into this.

Tim
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: Explicitly ignoring or making explicit matches

Post by devster »

timmotee wrote: 13 May 2019, 10:19 Message received. I'm on a managed appbox. I will ask to see if an update can be supported.
If the provider allows shell access (non-root) and as long as you have a java executable available you may be able to use the portable version.
I only work in black and sometimes very, very dark grey. (Batman)
timmotee
Posts: 9
Joined: 11 Mar 2018, 15:13

Re: Explicitly ignoring or making explicit matches

Post by timmotee »

Hi again,

The guys at bytesized did the upgrade for me an applied my license. It looks like the behavior is the same though:

Code: Select all

Input: /torrents/data/Into.The.Dark.2018.S01E08.All.That.We.Destroy.WEBRip.x264-TBS[ettv]/into.the.dark.2018.s01e08.all.that.we.destroy.webrip.x264-tbs[ettv].mkv
Group: [tvs:dark] => [into.the.dark.2018.s01e08.all.that.we.destroy.webrip.x264-tbs[ettv].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: [DARK, into the dark 2018]
Fetching episode data for [DARK]
Fetching episode data for [Ark]
Fetching episode data for [Dark Net]
Fetching episode data for [Darkroom]
Fetching episode data for [Dark Myth]
Fetching episode data for [Into the West]
Fetching episode data for [In The Dark]
Fetching episode data for [Shot in the Dark]
[COPY] From [/torrents/data/Into.The.Dark.2018.S01E08.All.That.We.Destroy.WEBRip.x264-TBS[ettv]/into.the.dark.2018.s01e08.all.that.we.destroy.webrip.x264-tbs[ettv].mkv] to [/media/New/TV Shows/DARK/Season 01/DARK - S01E08 - As You Sow, so You Shall Reap.mkv]
Processed 1 files
And then here's my version info:

Code: Select all

t$ filebot -script fn:sysinfo
FileBot 4.8.5 (r6224)
JNA Native: 5.2.2
MediaInfo: 18.12
7-Zip-JBinding: 9.20
Chromaprint: fpcalc version 1.2.0
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-05-15 (r565)
Groovy: 2.5.6
JRE: OpenJDK Runtime Environment 1.8.0_212
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 6 Core / 26 GB Max Memory / 54 MB Used Memory
OS: Linux (amd64)
HW: Linux gaia.bysh.me 4.15.0-47-generic #50~16.04.1-Ubuntu SMP Fri Mar 15 16:06:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Package: TAR
License: FileBot License xxxxxx (Valid-Until: 2068-11-05)
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 22990
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Explicitly ignoring or making explicit matches

Post by rednoah »

No idea. It works out of the box for me.

Here's what I'm testing with:

Code: Select all

tree .
.
├── INPUT
│   └── Into.The.Dark.2018.S01E08.All.That.We.Destroy.WEBRip.x264-TBS[ettv]
│       └── into.the.dark.2018.s01e08.all.that.we.destroy.webrip.x264-tbs[ettv].mkv
└── OUTPUT

3 directories, 1 file

Code: Select all

filebot -script fn:amc INPUT --action COPY --output OUTPUT --def minFileSize=0 -non-strict
Run script [fn:amc] at [Tue May 28 11:46:06 ICT 2019]
Parameter: minFileSize = 0
Argument[0]: INPUT
Input: INPUT/Into.The.Dark.2018.S01E08.All.That.We.Destroy.WEBRip.x264-TBS[ettv]/into.the.dark.2018.s01e08.all.that.we.destroy.webrip.x264-tbs[ettv].mkv
Group: [Series:into the dark 2018] => [into.the.dark.2018.s01e08.all.that.we.destroy.webrip.x264-tbs[ettv].mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Into the Dark 2018]
Fetching episode data for [Into the Dark]
[COPY] from [INPUT/Into.The.Dark.2018.S01E08.All.That.We.Destroy.WEBRip.x264-TBS[ettv]/into.the.dark.2018.s01e08.all.that.we.destroy.webrip.x264-tbs[ettv].mkv] to [OUTPUT/TV Shows/Into the Dark/Season 01/Into the Dark - S01E08 - All That We Destroy.mkv]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノ

Code: Select all

tree .
.
├── INPUT
│   └── Into.The.Dark.2018.S01E08.All.That.We.Destroy.WEBRip.x264-TBS[ettv]
│       └── into.the.dark.2018.s01e08.all.that.we.destroy.webrip.x264-tbs[ettv].mkv
└── OUTPUT
    └── TV\ Shows
        └── Into\ the\ Dark
            └── Season\ 01
                └── Into\ the\ Dark\ -\ S01E08\ -\ All\ That\ We\ Destroy.mkv

6 directories, 2 files

:!: Perhaps you have 2 different versions of FileBot installed? That would explain why amc script behaviour doesn't match the sysinfo output.
:idea: Please read the FAQ and How to Request Help.
timmotee
Posts: 9
Joined: 11 Mar 2018, 15:13

Re: Explicitly ignoring or making explicit matches

Post by timmotee »

Hello again,

Just a last update; you were correct in your last message - there was two versions of filebot on the same server. It is now working happily and matching the same way you are showing in your examples. Thanks for the help
User avatar
rednoah
The Source
Posts: 22990
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Explicitly ignoring or making explicit matches

Post by rednoah »

timmotee wrote: 30 May 2019, 13:14 you were correct in your last message - there was two versions of filebot on the same server
I'm so good at this it's scary. :ugeek: :lol:
:idea: Please read the FAQ and How to Request Help.
Post Reply