Skip to content

Commit

Permalink
MetadataLookupList: add lookup from mxml and nfo files for television…
Browse files Browse the repository at this point in the history
… 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 29, 2015
1 parent db2a27d commit e070b4f
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions mythtv/libs/libmythmetadata/metadatadownload.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit e070b4f

Please sign in to comment.