[mythtv-users] metadatalookup -- not searching tvdb after post processing RECORDED
John
reidjr at lineone.net
Wed Oct 31 13:03:42 UTC 2012
On 31/10/12 11:21, John wrote:
> Dutch/Belgian TV EPG often has the episode description hidden in the
> description. I have written a simple mysql query to pull out the
> subtitle from the description and update the subtitle. I have done
> this before, and running mythmetadata lookup then finds series/episode
> data.
>
> I have recently started recording " the big bang theory" which is on
> UK TV , which works perfectly, and dutch TV. Doing the post processing
> on the database doesn't work though. The metadata grabber appears to
> be convinced the dutch episodes are all movies, as the log only shows
> tmdb running
>
> The recording rule has an inetref, it is set to series 1 episode 1. I
> have removed the category saying its "Film-comedy", and the subtitle
> is now populated. Struggling through the code, as long as the
> recording has title subtitle and not categorised as Film or movie, it
> should be seen as a "show" and tvdb run .
>
> All of my messing around is in the recorded table, am I missing
> something ? Its not important, just irritating :-)
>
>
>
> // These functions exist to determine if we have enough
> // information to conclusively call something a Show vs. Movie
> LookupType GuessLookupType(ProgramInfo *pginfo)
> {
> LookupType ret = kUnknownVideo;
> QString catType = pginfo->GetCategoryType();
> if (catType.isEmpty())
> catType = pginfo->QueryCategoryType();
> if ((!pginfo->GetSubtitle().isEmpty() || pginfo->GetEpisode() > 0) &&
> (catType == "series" || catType == "tvshow" ||
> catType == "show"))
> ret = kProbableTelevision;
> else if (catType == "movie" || catType == "film")
> ret = kProbableMovie;
> else if (pginfo->GetSeason() > 0 || pginfo->GetEpisode() > 0 ||
> !pginfo->GetSubtitle().isEmpty())
> ret = kProbableTelevision;
> else
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
For the record, metadata lookup seems to rely on information from both
recorded and recordedprogram tables. The problem here was that the
original recordings ( for this specific case ) was setting
category_type = "movie" in recordedprogram , I assume due to the eit.
reverting it to "series" allows mythmetadata to do its thing.
For anybody still interested, the script I run as a user job is
included. Its basically an EPG fixup script, but outside the eit code.
#!/bin/bash
mysql -u mythtv -pmythtv mythconverg<<EOFMYSQL
update recorded set subtitle =
SUBSTRING_INDEX((SUBSTRING_INDEX(description, '"', -2)), '"', 1) where
description like '%"%"%' and subtitle like "";
update recordedprogram set subtitle =
SUBSTRING_INDEX((SUBSTRING_INDEX(description, '"', -2)), '"', 1),
category_type = "series" where description like '%"%"%' and subtitle
like "";
update recorded set subtitle =
SUBSTRING_INDEX((SUBSTRING_INDEX(description, '.: ', -1)), '.', 1) where
description like '%.: %.%' and subtitle like "";
update recordedprogram set subtitle =
SUBSTRING_INDEX((SUBSTRING_INDEX(description, '.: ', -1)), '.', 1),
category_type = "series" where description like '%.: %.%' and subtitle
like "";
EOFMYSQL
exit 0
More information about the mythtv-users
mailing list