[SOLVED] Failed to match files to episode data, renaming based on episode title only

Any questions? Need some help?
Post Reply
spuniun
Posts: 3
Joined: 08 Feb 2017, 17:06

[SOLVED] Failed to match files to episode data, renaming based on episode title only

Post by spuniun »

I've recently started using Plex DVR to supplement some of our TV shows that are slower to get to web release. The episode guide that Plex is using, however, has some really goofy numbering for some shows, so I've been having to manually rename things to match TheTVDB numbering to the rest of our integrations work. Clearly it is preferred to make this automated so I started looking at implementing renaming with filebot. I am using filebot 4.7.8 B3 CLI on a headless ubuntu 14.04 LTS server:

Code: Select all

FileBot 4.7.7 (r4762)
JNA Native: 5.1.0
MediaInfo: 0.7.67
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Script Bundle: 2017-01-05 (r470)
Groovy: 2.4.8
JRE: OpenJDK Runtime Environment 1.8.0_111
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 8 Core / 3 GB Max Memory / 18 MB Used Memory
OS: Linux (amd64)
Package: DEB
Data: /var/lib/plexmediaserver/.filebot
uname: Linux 4.4.0-62-generic #83~14.04.1-Ubuntu SMP Wed Jan 18 18:10:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Done ヾ(@⌒ー⌒@)ノ
I noticed that this output is claiming 4.7.7 however this is installed from SF:

Code: Select all

$ dpkg -l 'filebot'
||/ Name                  Version         Architecture    Description
+++-=====================-===============-===================================================
ii  filebot               4.7.8           amd64           The ultimate TV and Movie Renamer
So for this example, I'll stick with Fixer Upper as it's a little more straight forward in that the Plex EPG numbering is shifted from TheTVDB by one eposide; for example Plex DVR S04E10 = TheTVDB S04E09. After the show is recorded by Plex DVR it's written to:

Code: Select all

TV/Fixer Upper (2013)/Season 04/Fixer Upper (2013) - S04E10 - The Floating Fixer Upper.ts
The first behavior I noticed is that filebot assumes the number is correct and will rename the file's episode title to match.

Code: Select all

$ filebot -rename TV/Fixer\ Upper\ \(2013\)/Season\ 04/Fixer\ Upper\ \(2013\)\ -\ S04E10\ -\ The\ Floating\ Fixer\ Upper.ts --db TheTVDB --action test
Rename episodes using [TheTVDB]
Auto-detected query: [Fixer Upper]
Fetching episode data for [Fixer Upper]
[TEST] Rename [TV/Fixer Upper (2013)/Season 04/Fixer Upper (2013) - S04E10 - The Floating Fixer Upper.ts] to [TV/Fixer Upper (2013)/Season 04/Fixer Upper - 4x10 - Sweet Surprise at the Silos.ts]
A few forum searches and I found that, indeed, filebot always prefers SXXEXX matching when available but should work fine on episode title when not. So I tested by using a rename regex to strip the SXXEXX as suggested elsewhere in this forum:

Code: Select all

$ rename 's/(.*)S[0-9][0-9]E[0-9][0-9]\ -\ (.*)\.ts$/$1$2\.ts/' TV/Fixer\ Upper\ \(2013\)/Season\ 04/*.ts
TV/Fixer Upper (2013)/Season 04/Fixer Upper (2013) - The Floating Fixer Upper.ts
However, filebot now fails to match the episode at all:

Code: Select all

$ filebot -rename --db TheTVDB --action test TV/Fixer\ Upper\ \(2013\)/Season\ 04/Fixer\ Upper\ \(2013\)\ -\ The\ Floating\ Fixer\ Upper.ts
Rename episodes using [TheTVDB]
Auto-detected query: [Fixer Upper]
Fetching episode data for [Fixer Upper]
Failed to match files to episode data
Failure (°_°)
I can see that the episode title provided is a perfect string match to TheTVDB:

Code: Select all

$ filebot --q "Fixer Upper" -list --db TheTVDB
Fixer Upper - 4x09 - The Floating Fixer Upper
So I'm not entirely clear on how to proceed with automated episode matching based solely on title.
Last edited by spuniun on 08 Feb 2017, 18:12, edited 1 time in total.
spuniun
Posts: 3
Joined: 08 Feb 2017, 17:06

Re: Failed to match files to episode data, renaming based on episode title only

Post by spuniun »

nevermind, I just solved it myself....

Code: Select all

-non-strict
Post Reply