AMC and episode matching (match by title)

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
sblack55
Posts: 20
Joined: 23 Sep 2015, 18:43

AMC and episode matching (match by title)

Post by sblack55 » 06 Nov 2019, 14:07

Is there a way to influence the AMC script to match episodes by title when an episode number is present?

My input series filenames are in the form of <name>.<S00E00>.<episode>.<ext> Most of the time this works fine, but there are two cases that pose problems.

One is when broadcast EPG data has an episode number/title that does not conform to TheTVDB. Usually this means the episode title is correct, but the episode number is wrong. AMC then selects the episode for rename according to the number, when the name would be preferable.

The second is when there are many non-strict matches for the series. In this case the episode number is likely to match any of the matching series, whereas the title would have a better chance of matching the correct series. Of course this is really a broader problem that I would not expect to fix fully in this context, but it might help.

Ideally, I would like AMC to match by episode title if possible, and then fall back to episode number if necessary.

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

Re: AMC and episode matching

Post by rednoah » 06 Nov 2019, 14:20

Logs, please. The log will tell me the file path that isn't being processed correctly, which is absolute necessary for any kind of troubleshooting or testing of potential solutions.


:idea: Note that FileBot does use the episode title for matching, though SxE matches do take priority of course.


:idea: Please read How to Request Help.
:idea: Please read the FAQ and How to Request Help.

sblack55
Posts: 20
Joined: 23 Sep 2015, 18:43

Re: AMC and episode matching

Post by sblack55 » 06 Nov 2019, 14:47

No logs, and no paths processed incorrectly. This was just a general question based on long observation. Your answer is that I need to change other things so as not to include the episode number in the file name.

Thank you

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

Re: AMC and episode matching

Post by rednoah » 06 Nov 2019, 15:08

1.
If you just have the title, then it should work out of the box:

Code: Select all

filebot -rename *.mkv --db TheTVDB -non-strict --action TEST
Rename episodes using [TheTVDB] with [Airdate Order]
Auto-detected query: [South Park]
Fetching episode data for [South Park]
[TEST] from [South Park Tegridy Farms.mkv] to [South Park - 22x04 - Tegridy Farms.mkv]
Processed 1 files

2.
If you have misleading SxE numbers in the file name, then you can use --order AbsoluteAirdate (which matches by 20191106 numbers) to ensure that there's no SxE match, leaving only title match to go by:

Code: Select all

filebot -rename *.mkv --db TheTVDB -non-strict --action TEST --order AbsoluteAirdate
Rename episodes using [TheTVDB] with [Absolute Airdate Order]
Auto-detected query: [South Park]
Fetching episode data for [South Park]
[TEST] from [South Park S01E01 Tegridy Farms.mkv] to [South Park - 20181017 - Tegridy Farms.mkv]
Processed 1 files


EDIT:

Come to think of it, I guess --mapper could also be used to disable SxE matches... :lol: :lol: :lol:

Code: Select all

filebot -rename *.mkv --db TheTVDB -non-strict --action TEST --mapper "episode.derive(0,0)" --log INFO
[TEST] from [South Park S01E01 Tegridy Farms.mkv] to [South Park - 22x04 - Tegridy Farms.mkv]
:idea: Please read the FAQ and How to Request Help.

sblack55
Posts: 20
Joined: 23 Sep 2015, 18:43

Re: AMC and episode matching (match by title)

Post by sblack55 » 08 Nov 2019, 00:23

Ah, thank you, those were good suggestions, although they didn't quite work. AbsoluteAirdate returns the airdate as the renamed episode number which I can't use. --mapper is declared as an invalid option.

Command line:

Code: Select all

filebot -script fn:amc -non-strict --action hardlink --conflict auto --mapper "episode.derive(0,0)" --output "${DEST}" --def seriesFormat="${SERIES_FMT}" --def movieFormat="${MOVIE_FMT}" --def "ut_label=${UTLABEL}"                       "${sSourceFile}">/tmp/fblog.txt 2>&1
Log:

Code: Select all

Nov 07 19:01:10: |---< filebot log >------------------------------------------------------------|
Nov 07 19:01:11: "--mapper" is not a valid option
Nov 07 19:01:11: |---< filebot log >------------------------------------------------------------|
SysInfo:

Code: Select all

FileBot 4.8.5 (r6224)
JNA Native: 5.2.2
MediaInfo: 19.04
7-Zip-JBinding: 9.20
Chromaprint: fpcalc version 1.4.3
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-05-15 (r565)
Groovy: 2.5.6
JRE: Java(TM) SE Runtime Environment 1.8.0_131
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 443 MB Max Memory / 38 MB Used Memory
OS: Linux (amd64)
HW: Linux NetStore 3.10.105 #24922 SMP Wed Jul 3 16:37:24 CST 2019 x86_64 GNU/Linux synology_avoton_1815+
DATA: /volume1/@appstore/filebot/data/admin
Package: SPK
Activate License P9013368
License: FileBot License P9013368 (Valid-Until: 2020-08-23)
Done ヾ(@⌒ー⌒@)ノ

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

Re: AMC and episode matching (match by title)

Post by rednoah » 08 Nov 2019, 04:41

I guess --mapper was added rather recently.

Please try the latest beta for that one:
viewtopic.php?f=7&t=1609
:idea: Please read the FAQ and How to Request Help.

sblack55
Posts: 20
Joined: 23 Sep 2015, 18:43

Re: AMC and episode matching (match by title)

Post by sblack55 » 08 Nov 2019, 15:08

Code: Select all

[email protected]:/volume1/PVR/record/The Flintstones$ filebot -script fn:sysinfo
Unrecognized option: --illegal-access=permit
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
[email protected]:/volume1/PVR/record/The Flintstones$

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

Re: AMC and episode matching (match by title)

Post by rednoah » 08 Nov 2019, 15:45

Please use my Java Installer package instead of the Synology Java 8 package:
https://www.filebot.net/linux/syno.html

:idea: The error is caused by running a newer version of FileBot that requires Java 11 with Java 8.
:idea: Please read the FAQ and How to Request Help.

sblack55
Posts: 20
Joined: 23 Sep 2015, 18:43

Re: AMC and episode matching (match by title)

Post by sblack55 » 08 Nov 2019, 18:17

Ok, it's working now. One of the problematic shows will record tonight (I think) so I'll update on effectiveness soon.

plittlefield
Posts: 83
Joined: 09 Mar 2014, 19:15

Re: AMC and episode matching (match by title)

Post by plittlefield » 09 Nov 2019, 10:31

Hello All,

Not sure if this the correct forum thread, but as The Walking Dead is an AMC production and the Title is part of it, I have the following question...

...why does FileBot download episodes for other TV shows when it has already matched the correct one?

e.g.

In the example below, FileBot is fetching episode data for 'Fear the Walking Dead' and 'Talking Dead' when it has already correctly matched and decided upon 'The Walking Dead'...

Code: Select all

Input: /home/paully/Downloads/seedbox2/completed/The.Walking.Dead.S10E06.720p.WEB.H264-XLF[rarbg]/the.walking.dead.s10e06.720p.web.h264-xlf.mkv
Group: [tvs:the walking dead] => [the.walking.dead.s10e06.720p.web.h264-xlf.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [The Walking Dead]
Fetching episode data for [The Walking Dead]
Fetching episode data for [Fear the Walking Dead]
Fetching episode data for [Talking Dead]
[COPY] from [/home/paully/Downloads/seedbox2/completed/The.Walking.Dead.S10E06.720p.WEB.H264-XLF[rarbg]/the.walking.dead.s10e06.720p.web.h264-xlf.mkv] to [/home/paully/Plex/TV/The Walking Dead/The Walking Dead S10E06.mkv]
I look forward to your replies.

Cheers,

Paully
FileBot 4.8.2 (r5789)
JNA Native: 5.2.2
MediaInfo: 18.05
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-09-28 (r535)
Groovy: 2.5.1
JRE: Java(TM) SE Runtime Environment 10.0.2
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 3 GB Max Memory / 64 MB Used Memory
OS: Linux (amd64)
HW: Linux nas 4.4.0-130-generic #156-Ubuntu SMP Thu Jun 14 08:53:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Package: DEB

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

Re: AMC and episode matching (match by title)

Post by rednoah » 09 Nov 2019, 11:05

plittlefield wrote:
09 Nov 2019, 10:31
...why does FileBot download episodes for other TV shows when it has already matched the correct one?

e.g.

In the example below, FileBot is fetching episode data for 'Fear the Walking Dead' and 'Talking Dead' when it has already correctly matched and decided upon 'The Walking Dead'...

Code: Select all

Auto-detected query: [The Walking Dead]
Simply because it has not yet decided on TheTVDB::153021 (i.e. The Walking Dead in human-readable form). It has merely decided to search for "The Walking Dead" and then the next step is to look at all the options we get in response to this search query.
:idea: Please read the FAQ and How to Request Help.

plittlefield
Posts: 83
Joined: 09 Mar 2014, 19:15

Re: AMC and episode matching (match by title)

Post by plittlefield » 09 Nov 2019, 11:18

Ah, OK... thanks for the clarification!

I thought it might be a time saving opportunity.

Where does it show it's decided on that one or does it just "get on with it"?
FileBot 4.8.2 (r5789)
JNA Native: 5.2.2
MediaInfo: 18.05
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-09-28 (r535)
Groovy: 2.5.1
JRE: Java(TM) SE Runtime Environment 10.0.2
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 3 GB Max Memory / 64 MB Used Memory
OS: Linux (amd64)
HW: Linux nas 4.4.0-130-generic #156-Ubuntu SMP Thu Jun 14 08:53:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Package: DEB

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

Re: AMC and episode matching (match by title)

Post by rednoah » 09 Nov 2019, 16:00

plittlefield wrote:
09 Nov 2019, 11:18
Where does it show it's decided on that one or does it just "get on with it"?
FileBot at no point in time decides on a TV Series. It'll query for a potential series name or alias, get all episodes for all series options, then match the correct Episode object, so we only "know" the series when we know the episode.

If we could assume that files are already well-named and match exactly what's in the database, then that would indeed be a great time saving opportunity, but alas it would come at a cost in capability.
:idea: Please read the FAQ and How to Request Help.

plittlefield
Posts: 83
Joined: 09 Mar 2014, 19:15

Re: AMC and episode matching (match by title)

Post by plittlefield » 11 Nov 2019, 10:05

OK, understood.

It does make me laugh sometimes when I see the results.

Here's another example from this morning...

Code: Select all

Group: [tvs:family guy] => [family.guy.s18e06.720p.web.x264-tbs.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Family Guy]
Fetching episode data for [Family Guy]
Fetching episode data for [Family Guns]
Fetching episode data for [Family Game]
Fetching episode data for [Family Dog]
Fetching episode data for [Turkish for Beginners]
:-)

...keep up the good work.

Regards,

Paully
FileBot 4.8.2 (r5789)
JNA Native: 5.2.2
MediaInfo: 18.05
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-09-28 (r535)
Groovy: 2.5.1
JRE: Java(TM) SE Runtime Environment 10.0.2
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 3 GB Max Memory / 64 MB Used Memory
OS: Linux (amd64)
HW: Linux nas 4.4.0-130-generic #156-Ubuntu SMP Thu Jun 14 08:53:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Package: DEB

sblack55
Posts: 20
Joined: 23 Sep 2015, 18:43

Re: AMC and episode matching (match by title)

Post by sblack55 » 11 Nov 2019, 15:49

sblack55 wrote:
08 Nov 2019, 18:17
Ok, it's working now. One of the problematic shows will record tonight (I think) so I'll update on effectiveness soon.
It worked perfectly. Episodes of The Outer Limits were correctly identified from both the 1963 and 1995 series, where normally the 1963 episodes would have been misidentified as 1995.

Thank you! This will improve my success rate from about 90% to 98%.

Post Reply