Skip to content

Commit

Permalink
libmythmetadata: Allow the MetadataFactory to lookup a MetadataLookup.
Browse files Browse the repository at this point in the history
This is needed when an initial lookup returns multiple potential lookups and the user is forced to act on them-- we need to be able to pass the resulting lookup back in.

Bumps API again.  I'd love to be able to tell you this is the last time I will do this today, but it's probably not.
  • Loading branch information
Robert McNamara committed Jul 1, 2011
1 parent e0b3ecc commit 1e15d84
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythversion.h
Expand Up @@ -12,7 +12,7 @@
/// Update this whenever the plug-in API changes.
/// Including changes in the libmythbase, libmyth, libmythtv, libmythav* and
/// libmythui class methods used by plug-ins.
#define MYTH_BINARY_VERSION "0.25.20110701-2"
#define MYTH_BINARY_VERSION "0.25.20110701-3"

/** \brief Increment this whenever the MythTV network protocol changes.
*
Expand Down
11 changes: 11 additions & 0 deletions mythtv/libs/libmythmetadata/metadatafactory.cpp
Expand Up @@ -102,6 +102,17 @@ void MetadataFactory::Lookup(VideoMetadata *metadata, bool automatic,
m_lookupthread->addLookup(lookup);
}

void MetadataFactory::Lookup(MetadataLookup *lookup)
{
if (!lookup)
return;

if (m_lookupthread->isRunning())
m_lookupthread->prependLookup(lookup);
else
m_lookupthread->addLookup(lookup);
}

void MetadataFactory::OnMultiResult(MetadataLookupList list)
{
if (!list.size())
Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmythmetadata/metadatafactory.h
Expand Up @@ -59,6 +59,7 @@ class META_PUBLIC MetadataFactory : public QObject
bool getimages = true);
void Lookup(VideoMetadata *metadata, bool automatic = true,
bool getimages = true);
void Lookup(MetadataLookup *lookup);

bool IsRunning() { return m_lookupthread->isRunning() ||
m_imagedownload->isRunning(); };
Expand Down

0 comments on commit 1e15d84

Please sign in to comment.