<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 25, 2013 at 1:11 AM, Stephen Worthington <span dir="ltr"><<a href="mailto:stephen_agent@jsw.gen.nz" target="_blank">stephen_agent@jsw.gen.nz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, 24 Sep 2013 14:04:24 +1000, you wrote:<br>
I have done very little C++, but I am intending to try the following<br>
patch tomorrow when I have a big enough gap between recordings:<br>
<br>
diff --git a/mythtv/programs/mythbackend/backendhousekeeper.cpp<br>
b/mythtv/programs/mythbackend/backendhousekeeper.cpp<br>
old mode 100644<br>
new mode 100755<br>
index e64477e..eb4ebbd<br>
--- a/mythtv/programs/mythbackend/backendhousekeeper.cpp<br>
+++ b/mythtv/programs/mythbackend/backendhousekeeper.cpp<br>
@@ -437,6 +437,13 @@ ArtworkTask::ArtworkTask(void) :<br>
DailyHouseKeeperTask("RecordedArtworkUpdate",<br>
{<br>
}<br>
<br>
+bool ArtworkTask::DoCheckRun(QDateTime now)<br>
+{<br>
+ if (!gCoreContext->GetNumSetting("AutoMetadataLookup", 1))<br>
+ return false;<br>
+ return DailyHouseKeeperTask::DoCheckRun(now);<br>
+}<br>
+<br>
bool ArtworkTask::DoRun(void)<br>
{<br>
if (m_msMML)<br>
diff --git a/mythtv/programs/mythbackend/backendhousekeeper.h<br>
b/mythtv/programs/mythbackend/backendhousekeeper.h<br>
old mode 100644<br>
new mode 100755<br>
index d24efae..12b2a46<br>
--- a/mythtv/programs/mythbackend/backendhousekeeper.h<br>
+++ b/mythtv/programs/mythbackend/backendhousekeeper.h<br>
@@ -47,6 +47,7 @@ class ArtworkTask : public DailyHouseKeeperTask<br>
ArtworkTask(void);<br>
virtual ~ArtworkTask(void);<br>
bool DoRun(void);<br>
+ virtual bool DoCheckRun(QDateTime now);<br>
virtual void Terminate(void);<br>
private:<br>
MythSystemLegacy *m_msMML;<br>
<br>
Since this is my first foray into the MythTV code, there are any<br>
number of things I could be doing wrong, so if anyone spots something,<br>
please let me know.<br></blockquote></div><br></div><div class="gmail_extra">I also don't know the MythTV code, but it might be a good idea to check if gCoreContext is null before invoking a function call on it. In other words:<br>
<br>if (gCoreContext && !gCoreContext->GetNumSetting("AutoMetadataLookup", 1)) {<br></div><div class="gmail_extra"> return false;<br>}<br></div><div class="gmail_extra"><br>Possibly the class design prevents it from being null, though. Note that I also added the braces. I don't know the MythTV coding convention, but many typical coding conventions require braces after conditional statements because if you want to add another conditionally executed statement later it's easy to forget to enclose the whole block in braces in which case only the first line after the "if" will be conditionally executed while the other statements are always executed, leading to much head scratching.<br>
<br></div><div class="gmail_extra">Karl<br></div></div>