Skip to content

Commit

Permalink
Metadata Lookup: conditionally show both Movie and TV results.
Browse files Browse the repository at this point in the history
When the following are true:

* The item being looked up is a recording/guide item
* The item appears generic or like a movie
* The item has no inetref set

query both the TV and Movie metadata sources and return a list of results for both.  This has a couple of advantages.  The first is that when looking up a generic episode of, say, "Chuck," the old behavior would try the Movie grabber, return some results, and stop.  Instead, in these cases, it's more appropriate to present a list of returns from both results and allow the user to choose.

This also helps with the issue where some clown sets up a metadata record for a TV show at TMDB, and gives the user the opportunity to select the right record from the right metadata source.

All the auto-matching based on year/etc. is still present and functional, and my usual test cases are still automatically matched (Castle, Conan, etc) but with the added bonus of having working auto-match for generic episodes as well.

Nothing for video metadata lookup changes with this commit.  It only affects recordings/MythMetadataLookup.
  • Loading branch information
Robert McNamara committed Aug 18, 2011
1 parent e13b8a8 commit 712bc28
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions mythtv/libs/libmythmetadata/metadatadownload.cpp
Expand Up @@ -94,17 +94,21 @@ void MetadataDownload::run()
list = handleTelevision(lookup);
else if (!lookup->GetSubtitle().isEmpty())
list = handleVideoUndetermined(lookup);

if (!list.size())
list = handleRecordingGeneric(lookup);
}
else if (lookup->GetSubtype() == kProbableMovie)
{
list = handleMovie(lookup);
if (lookup->GetInetref().isEmpty())
list.append(handleRecordingGeneric(lookup));
}
else
list = handleRecordingGeneric(lookup);

if (!list.size() &&
(lookup->GetSubtype() == kProbableMovie ||
lookup->GetSubtype() == kProbableTelevision))
{
list = handleRecordingGeneric(lookup);
if (lookup->GetInetref().isEmpty())
list.append(handleMovie(lookup));
}
}
else if (lookup->GetType() == kMetadataGame)
Expand Down

0 comments on commit 712bc28

Please sign in to comment.