Skip to content

Commit

Permalink
Enforce the functioning of grabbers when running MythMetadataLookup.
Browse files Browse the repository at this point in the history
Use the new -t grabber switch to test that all is well before embarking on a batch operation.
  • Loading branch information
Robert McNamara committed Jul 25, 2011
1 parent 932c86a commit 80e8dda
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mythtv/programs/mythmetadatalookup/lookup.h
Expand Up @@ -13,6 +13,8 @@ class LookerUpper : public QObject
LookerUpper();
~LookerUpper();

bool AllOK() { return m_metadataFactory->VideoGrabbersFunctional(); };

bool StillWorking();

void HandleSingleRecording(const uint chanid,
Expand Down
11 changes: 11 additions & 0 deletions mythtv/programs/mythmetadatalookup/main.cpp
Expand Up @@ -192,6 +192,17 @@ int main(int argc, char *argv[])
JobQueue::GetJobInfoFromID(jobid, type, chanid, starttime);
}

LOG(VB_GENERAL, LOG_INFO,
"Testing grabbers and metadata sites for functionality...");
if (!lookup->AllOK())
{
delete lookup;
delete gContext;
return GENERIC_EXIT_NOT_OK;
}
LOG(VB_GENERAL, LOG_INFO,
"All grabbers tested and working. Continuing...");

if (refreshall)
{
lookup->CopyRuleInetrefsToRecordings();
Expand Down

0 comments on commit 80e8dda

Please sign in to comment.