Skip to content

Commit ce20f46

Browse files
committed
Make the housekeeper ignore the MythFillMinHour and MythFillMaxHour settings
when MythFillGrabberSuggestsTime is enabled. This allows mythfilldatabase to run anytime if it couldn't run at the suggested time. This is especially useful for people that shutdown their backends. Since we're not honoring the min/max time settings anymore for users with MythFillGrabberSuggestsTime turned ON, don't bother setting these fields inside the DataDirect grabber. Also update the help text for MythFillGrabberSuggestsTime to reflect that the min/max values are not used when this setting is enabled. Closes #3302 using patches submitted by Michael T. Dean. git-svn-id: http://svn.mythtv.org/svn/trunk@13250 7dbf422c-18fa-0310-86e9-fd20926502f2
1 parent 1fb2089 commit ce20f46

File tree

3 files changed

+4
-20
lines changed

3 files changed

+4
-20
lines changed

mythtv/libs/libmythtv/datadirect.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -972,27 +972,10 @@ bool DataDirectProcessor::GrabNextSuggestedTime(void)
972972
NextSuggestedTime = newTime;
973973
}
974974

975-
int minhr = NextSuggestedTime.toString("h").toInt();
976-
int maxhr = NextSuggestedTime.addSecs(7200).toString("h").toInt();
977-
978-
if (maxhr < minhr)
979-
{
980-
minhr = 22;
981-
maxhr = 24;
982-
}
983-
984975
MSqlQuery query(MSqlQuery::DDCon());
985976
QString querystr =
986977
QString("UPDATE settings SET data = '%1' WHERE value = '%2';");
987978

988-
query.prepare(querystr.arg(minhr).arg("MythFillMinHour"));
989-
if (!query.exec())
990-
MythContext::DBError("Updating DataDirect MythFillMinHour", query);
991-
992-
query.prepare(querystr.arg(maxhr).arg("MythFillMaxHour"));
993-
if (!query.exec())
994-
MythContext::DBError("Updating DataDirect MythFillMaxHour", query);
995-
996979
query.prepare(querystr.arg(NextSuggestedTime.toString(Qt::ISODate))
997980
.arg("MythFillSuggestedRunTime"));
998981

mythtv/programs/mythbackend/housekeeper.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,7 @@ void HouseKeeper::RunHouseKeeping(void)
224224
int hour = now.toString(QString("h")).toInt();
225225

226226
if ((nextRun < now) &&
227-
(lastRun.secsTo(now) > (3 * 60 * 60)) &&
228-
((minhr <= hour) && (hour <= maxhr)))
227+
(lastRun.secsTo(now) > (3 * 60 * 60)))
229228
runMythFill = true;
230229
}
231230
else if (wantToRun("MythFillDB", period, minhr, maxhr))

mythtv/programs/mythfrontend/globalsettings.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2940,7 +2940,9 @@ static GlobalCheckBox *MythFillGrabberSuggestsTime()
29402940
bc->setValue(true);
29412941
bc->setHelpText(QObject::tr("This setting allows a DataDirect guide data "
29422942
"provider to specify the next download time in order to "
2943-
"distribute load on their servers."));
2943+
"distribute load on their servers. If this setting is "
2944+
"enabled, mythfilldatabase Execution Start/End times are "
2945+
"ignored."));
29442946
return bc;
29452947
}
29462948

0 commit comments

Comments
 (0)