[mythtv-users] MythMetadataLookup questions

Robert McNamara robert.mcnamara at gmail.com
Sat Jul 30 01:17:23 UTC 2011


So, to start with, your guide data appears to be, for lack of a better
term, "a disaster."  I do see one place where I might be more
permissive and I'll look at that when I get home in a few days, but
most of your lack of automation is because instead of putting in a
correct episode name, your guide source puts in something that appears
to be a description of when the episode first aired-- this is not what
should appear in the subtitle field.  The title is supposed to be the
*whole* title of the show, and the subtitle is supposed to be the
episode name.  It is also because you are telling MythTV with your
frontend language that the data being supplied is in english-- it's
not.

On Fri, Jul 29, 2011 at 10:57 AM, raptor jr <raptorjr at hotmail.com> wrote:
> Now i have cleared the cache, and will only be using Arclight 25.11.
>
> So for a few examples. I have recorded Air Crash Investigation (in Swedish
> it is called Haverikommissionen). If i search for that show on thetvdb.com,
> in all languages, i get 1 hit. But MML fails to find anything.
>

You are running your frontend in english.  Thus, the grabber is
hunting for english titles, and failing:

root at Holmes:~# /usr/share/mythtv/metadata/Television/ttvdb.py -l en -M
"Haverikommissionen"
root at Holmes:~#

Whoops, nothing.  Because the API requires that you to specify a
target language, and falls back to english.  If you want accurate
matching of Swedish, run your frontend in Swedish:

root at Holmes:~# /usr/share/mythtv/metadata/Television/ttvdb.py -l sv -M
"Haverikommissionen"
<?xml version='1.0' encoding='UTF-8'?>
<metadata>
  <item>
    <language>sv</language>
    <title>Haverikommissionen</title>
    <inetref>79771</inetref>
    <imdb>0386950</imdb>
    <tmsref>EP00293195</tmsref>
    <description>Major real-life air disasters are depicted in this TV
series. Each episode features a detailed dramatized reconstruction of
the incident based on cockpit voice recorders and air traffic control
transcripts, as well as eyewitnesses recounts and interviews with
aviation experts. Sometimes, interviews with investigators who dealt
with the disaster or even actual footage are featured. In Canada,
where the series originated, the show is called 'Mayday'. In the US it
is 'Air Emergency'. Everywhere else it is called 'Air Crash
Investigation'. Show info &amp; Nat Geo Episode guide here:
http://natgeotv.com/uk/air-crash-investigation/about</description>
    <releasedate>2003-09-03</releasedate>
    <images>
      <image type="banner"
url="http://www.thetvdb.com/banners/graphical/79771-g.jpg"
thumb="http://www.thetvdb.com/banners/_cache/graphical/79771-g.jpg"/>
    </images>
  </item>
</metadata>

There is no penalty metadatawise to you running in Swedish-- English
titles will still be matched as a fallback.  If you insist on running
a frontend in one language and expecting programming in another to
work, you will need to edit code to make it do so.

In the case of Twilight Zone, the logs specifically tell you that it
could not exactly match this item, and that you should go to your
recording rule and pick from them, or manually set an inetref.  This
is the case with most of your content.  For the sake of completeness,
let's look at it:

2011-07-29 10:37:28.021177 I  Running Grabber:
/usr/share/mythtv/metadata/Television/ttvdb.py -l en -M Twilight zone

A search for "The Twilight Zone," so far so good.

2011-07-29 10:37:28.225246 I  Matched from multiple results based on year.

Because the TVDB has multiple shows that match a search for "Twilight
Zone" (and even then, this title isn't correct, the name of the show
is "THE Twilight Zone"), it turns to the year of the show to match,
which allows it to narrow down the correct one.

2011-07-29 10:37:28.322942 I  Returning Metadata Results: Twilight zone 0 0
2011-07-29 10:37:28.323007 I  Running Grabber:
/usr/share/mythtv/metadata/Television/ttvdb.py -l en -N 72176 Del 3 av
24 säsong 19

Because of the broken data provided by your source/grabber, it's
unable to get specific metadata for this item, because the subtitle
(episode name) is completely made up and doesn't exist in the series.
So, you won't get a season and episode value.

So, you might ask, why doesn't it at least get me artwork?  Because
you haven't followed the documentation, OR the detailed information
from my last e-mail (or, a distant possibility, because you have
mangled your recording rules and recording DB with some sort of manual
insert).

You have a ton of existing recordings, and rules.  So, once again for
clarity, here's how it works.

Recordings and Recording rules are unique entities.  EACH can have an
inetref, or not.  When you set an inetref on a recording rule, all
FUTURE recordings on that rule will inherit the inetref and will look
up at the correct metadata source.  All *current* recordings from that
rule remain as they were, unless you run mythmetadatalookup
--refresh-all, which will attempt to copy rule inetrefs to recordings
which were based on them.  You mention in your mail that you edited
the rule and then use the recording metadata as proof that it didn't
work-- it's only proof that you didn't follow the documentation for
bringing legacy recordings up to date.

The reason MML is trying so hard and failing to get artwork/metadata
for you is because you have either not set the inetrefs for those it
tells you have multiple possible matches.  I wrote you an extremely
long e-mail above that explains the steps you should take for legacy
content, and how to make sure future recordings work.  This
information is also in the wiki.  You *must* follow the four steps
listed above to set inetrefs for ALL your recording rules which were
not automatically matched.  Once you have done this,
MythMetadataLookup WILL pull in artwork for those items.  Moreover,
assuming your rules and recordings are actually matched (the
recordings point to the recordid of the rule in question), all future
recordings will have a correct inetref (and thus artwork) set.

> I also recorded The Persuaders(in Swedish it is called Snobbar som jobbar),
> there i also get 1 hit on thetvdb.com, but MML fails to find anything.
>

Same situation again.  You need to run your frontend in Swedish.

root at Holmes:~# /usr/share/mythtv/metadata/Television/ttvdb.py -l sv -M
"Snobbar som jobbar"
<?xml version='1.0' encoding='UTF-8'?>
<metadata>
  <item>
    <language>sv</language>
    <title>Snobbar som jobbar</title>
    <inetref>76362</inetref>
    <imdb>0066701</imdb>
    <description>English Lord Brett Sinclair and American Danny Wilde
are both wealthy playboys, they are teamed together by Judge Fullton
to investigate crimes which the police can't solve. These two men are
complete opposites, but become great friends through their adventures
and constantly risk their own lives for one another.</description>
    <releasedate>1971-09-01</releasedate>
    <images>
      <image type="banner"
url="http://www.thetvdb.com/banners/graphical/4012-g.jpg"
thumb="http://www.thetvdb.com/banners/_cache/graphical/4012-g.jpg"/>
    </images>
  </item>
</metadata>

MML works perfectly with this title when you don't tell it the title
you are feeding it is in English.

> Next example is Star Trek Voyager. Main titel on my recording is Star trek,
> and subtitle is Voyager. MML finds nothing. The only thing that is different
> is on thetvdb.com it is Trek with a capital T, but my recording is trek with
> small t. Is "Star Trek Voyager" != "Star trek Voyager" to MML?
>

The show is not called "Star Trek" with a subtitle of "Voyager," but
that's what your guide data has it as.  The name of the show is "Star
Trek: Voyager," which must ALL be in the title field to get a correct
match.  For reference, "Star Trek: Voyager," "Star trek voyager," and
"StAr TrEk VoYaGeR" all work when in the title field.  The name of the
show is NOT "Star Trek," however.  That is another show entirely-- in
fact, it's multiple matches, which is why you don't get an automated
one.  Because of your broken guide data, you should go in the
recording rules, as detailed above in text and with screenshots on the
wiki, and set an inetref.  Then on a run of mythmetadatalookup
--refresh-all, existing recordings will inherit the correct inetref.
You just won't get very good data for the individual recordings since
the guide data is a disaster-- You should complain to your provider
that they should put the title in the title field, and start
populating the episode name correctly.

> For Scrubs i get 2 hits, but when i try to select the first one i only get
> back to the searchresult. If i exit that list and select Perform Query
> again, i get 2 hits, try to select the first one but it dont work.
>

Scrubs works perfectly here.

> Sweeney Todd, get several hits on Metadata options, select the one i want,
> inetref 13885, select Done and then Save. If i then check in Edit Recording
> Metadata, the inetref is empty.
>

Because you edited the recording rule inetref, not the one for the
recording.  As detailed in my e-mail before and in this e-mail again,
as well as on the wiki, well... I hope you get the point now.  Go to
each of your rules.  Select the correct item when there are more than
one.    Save the rule.  Run mythmetadatalookup --refresh-all.  Now all
existing recordings from that rule will have the correct inetref.

> Anyway, i have gone through most of my recordings and in almost every case
> there was i direct hit and a inetref, so i should have worked automatically.
> After that i ran --refresh-all and --refresh-all-artwork, supplied in the
> two files. And still i dont get artwork, but i can see that the recordings
> have a inetref. Also a CSV file of the recordedartwork table.
>

Your error is explained above.  Clearly, the recordings do *not* have
an inetref, otherwise that would be the first item used and the title
lookup step would be skipped entirely.

If this is not clear to you and you are not able to get good results,
I suggest you ignore this functionality for now.  It is aimed at those
who are using Myth in the expected manner (where the frontend language
matches the metadata language).  Maybe we can make things easier for
those who run an unsupported configuration like this in the future,
but for now, our metadata lookups assume this to be the case.  It
would be relatively easy to patch myth yourself to hardcode swedish as
the language for metadata lookups while remaining in English for the
frontend, but it is not my intent to support it, so I won't be
providing instruction on doing so.

I am abstaining from future response here, at least until I am
confident that the documentation has been followed, and that you are
using a supported configuration.

Robert


More information about the mythtv-users mailing list