Skip to content

Commit

Permalink
Remove the MythFillPeriod setting. The required run frequency is some…
Browse files Browse the repository at this point in the history
…thing best left to MythTV and the xmltv script or SD to determine not the end-user. This simplifies the setup a little and reduces the possibility of mis-configuration causing problems for the user.
  • Loading branch information
stuartm committed May 23, 2011
1 parent 032e2cb commit b8b65c2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 35 deletions.
24 changes: 2 additions & 22 deletions mythtv/libs/libmythtv/datadirect.cpp
Expand Up @@ -1153,29 +1153,9 @@ bool DataDirectProcessor::GrabNextSuggestedTime(void)
}

if (GotNextSuggestedTime)
{
int daysToSuggested =
QDateTime::currentDateTime().daysTo(NextSuggestedTime);
int desiredPeriod = gCoreContext->GetNumSetting("MythFillPeriod", 1);


if (daysToSuggested > desiredPeriod)
{
QDateTime newTime =
NextSuggestedTime.addDays(desiredPeriod - daysToSuggested);
VERBOSE(VB_IMPORTANT, LOC + QString(
"Provider suggested running again at %1, "
"but MythFillPeriod is %2. Next run time "
"will be adjusted to be %3.")
.arg(NextSuggestedTime.toString(Qt::ISODate))
.arg(desiredPeriod)
.arg(newTime.toString(Qt::ISODate)));
NextSuggestedTime = newTime;
}

gCoreContext->SaveSettingOnHost("MythFillSuggestedRunTime",
gCoreContext->SaveSettingOnHost("MythFillSuggestedRunTime",
NextSuggestedTime.toString(Qt::ISODate), NULL);
}

return GotNextSuggestedTime;
}

Expand Down
4 changes: 2 additions & 2 deletions mythtv/programs/mythbackend/housekeeper.cpp
Expand Up @@ -235,7 +235,7 @@ void HouseKeeper::RunHouseKeeping(void)
}
else
{
period = gCoreContext->GetNumSetting("MythFillPeriod", 1);
period = 1;
minhr = gCoreContext->GetNumSetting("MythFillMinHour", -1);
if (minhr == -1)
{
Expand Down Expand Up @@ -763,7 +763,7 @@ void HouseKeeper::UpdateThemeChooserInfoCache(void)
"remote themes info package.").arg(url));
return;
}

if (!extractZIP(remoteThemesFile, remoteThemesDir))
{
VERBOSE(VB_IMPORTANT, QString("HouseKeeper: Error extracting %1"
Expand Down
11 changes: 0 additions & 11 deletions mythtv/programs/mythtv-setup/backendsettings.cpp
Expand Up @@ -821,16 +821,6 @@ static GlobalCheckBox *MythFillEnabled()
return bc;
}

static GlobalSpinBox *MythFillPeriod()
{
GlobalSpinBox *bs = new GlobalSpinBox("MythFillPeriod", 1, 30, 1);
bs->setLabel(QObject::tr("mythfilldatabase run frequency (days)"));
bs->setValue(1);
bs->setHelpText(QObject::tr("The number of days between mythfilldatabase "
"runs."));
return bs;
}

static GlobalSpinBox *MythFillMinHour()
{
GlobalSpinBox *bs = new GlobalSpinBox("MythFillMinHour", 0, 23, 1);
Expand Down Expand Up @@ -946,7 +936,6 @@ class MythFillSettings : public TriggeredConfigurationGroup
settings->addChild(MythFillDatabasePath());
settings->addChild(MythFillDatabaseArgs());
settings->addChild(MythFillDatabaseLog());
settings->addChild(MythFillPeriod());
settings->addChild(MythFillMinHour());
settings->addChild(MythFillMaxHour());
settings->addChild(MythFillGrabberSuggestsTime());
Expand Down

0 comments on commit b8b65c2

Please sign in to comment.