Skip to content
Permalink
Browse files

MetadataLookupList: add lookup from mxml and nfo files for television…

… files

We already looked for them first when looking for metadata for movies so also
look for them for television files as well first then fall back to the
grabber scripts etc.
  • Loading branch information...
paul-h authored and Paul Harrison committed Nov 11, 2015
1 parent db2a27d commit e070b4ff174972646c3808e0a2f50ebf6de4b6ce
Showing with 25 additions and 5 deletions.
  1. +25 −5 mythtv/libs/libmythmetadata/metadatadownload.cpp
@@ -540,15 +540,35 @@ MetadataLookupList MetadataDownload::handleMovie(MetadataLookup *lookup)
/**
* handleTelevision
* attempt to find television data via the following (in order)
* 1- By inetref with subtitle
* 2- By inetref with season and episode
* 3- By inetref
* 4- By title and subtitle
* 5- By title
* 1- Local MXML
* 2- Local NFO
* 3- By inetref with subtitle
* 4- By inetref with season and episode
* 5- By inetref
* 6- By title and subtitle
* 7- By title
*/
MetadataLookupList MetadataDownload::handleTelevision(MetadataLookup *lookup)
{
MetadataLookupList list;

QString mxml;
QString nfo;

if (!lookup->GetFilename().isEmpty())
{
mxml = getMXMLPath(lookup->GetFilename());
nfo = getNFOPath(lookup->GetFilename());
}

if (!mxml.isEmpty())
list = readMXML(mxml, lookup);
else if (!nfo.isEmpty())
list = readNFO(nfo, lookup);

if (!list.isEmpty())
return list;

MetaGrabberScript grabber =
MetaGrabberScript::GetGrabber(kGrabberTelevision, lookup);
bool searchcollection = false;

0 comments on commit e070b4f

Please sign in to comment.
You can’t perform that action at this time.