Permalink
Browse files

Metadata Lookup: conditionally show both Movie and TV results.

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
Robert McNamara committed Aug 18, 2011
1 parent e13b8a8 commit 712bc285162ccc5864abfd35473a5432d227e65a
Showing with 9 additions and 5 deletions.
  1. +9 −5 mythtv/libs/libmythmetadata/metadatadownload.cpp
@@ -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)

0 comments on commit 712bc28

Please sign in to comment.