summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Engel <dengel@mythtv.org>2012-12-06 22:54:57 (GMT)
committer David Engel <dengel@mythtv.org>2012-12-06 22:54:57 (GMT)
commit9aaed0b75635884bbdbdfb29bcaf2631bd2a5ad5 (patch)
tree2eee5ce6f620caff8c5e11849e21839c2c82134b
parent8158cf7b7bbe5413e6d7d9cf3109c3bfa603c590 (diff)
Remove the AutoRecPriority feature.
AutoRecPriority is a little known and probably even less used feature that dynamically adjusts recording priorities based on the user's viewing habits. There's a small chance it could return in the future, but the implementation would be quite different.
-rw-r--r--mythtv/programs/mythbackend/scheduler.cpp13
-rw-r--r--mythtv/programs/mythfrontend/globalsettings.cpp13
-rw-r--r--mythtv/programs/mythfrontend/programrecpriority.cpp81
-rw-r--r--mythtv/programs/mythfrontend/programrecpriority.h1
4 files changed, 20 insertions, 88 deletions
diff --git a/mythtv/programs/mythbackend/scheduler.cpp b/mythtv/programs/mythbackend/scheduler.cpp
index 3a18481..9cee2fa 100644
--- a/mythtv/programs/mythbackend/scheduler.cpp
+++ b/mythtv/programs/mythbackend/scheduler.cpp
@@ -3901,15 +3901,12 @@ void Scheduler::AddNewRecords(void)
prefinputpri = gCoreContext->GetNumSetting("PrefInputPriority", 2);
int hdtvpriority = gCoreContext->GetNumSetting("HDTVRecPriority", 0);
int wspriority = gCoreContext->GetNumSetting("WSRecPriority", 0);
- int autopriority = gCoreContext->GetNumSetting("AutoRecPriority", 0);
int slpriority = gCoreContext->GetNumSetting("SignLangRecPriority", 0);
int onscrpriority = gCoreContext->GetNumSetting("OnScrSubRecPriority", 0);
int ccpriority = gCoreContext->GetNumSetting("CCRecPriority", 0);
int hhpriority = gCoreContext->GetNumSetting("HardHearRecPriority", 0);
int adpriority = gCoreContext->GetNumSetting("AudioDescRecPriority", 0);
- int autostrata = autopriority * 2 + 1;
-
QString pwrpri = "channel.recpriority + cardinput.recpriority";
if (prefinputpri)
@@ -3993,8 +3990,7 @@ void Scheduler::AddNewRecords(void)
" RECTABLE.playgroup, oldrecstatus.recstatus, "//36-37
" oldrecstatus.reactivate, p.videoprop+0, "//38-39
" p.subtitletypes+0, p.audioprop+0, RECTABLE.storagegroup, "//40-42
- " capturecard.hostname, recordmatch.oldrecstatus, "
- " RECTABLE.avg_delay, "//43-45
+ " capturecard.hostname, recordmatch.oldrecstatus, NULL, "//43-45
" oldrecstatus.future, cardinput.schedorder, " //46-47
" p.syndicatedepisodenumber, p.partnumber, p.parttotal, ") + //48-50
pwrpri + QString(
@@ -4127,11 +4123,8 @@ void Scheduler::AddNewRecords(void)
p->SetRecordingStatus(p->oldrecstatus);
}
- p->SetRecordingPriority(
- p->GetRecordingPriority() +
- result.value(51).toInt() +
- ((autopriority) ?
- autopriority - (result.value(45).toInt() * autostrata / 200) : 0));
+ p->SetRecordingPriority(p->GetRecordingPriority() +
+ result.value(51).toInt());
// Check to see if the program is currently recording and if
// the end time was changed. Ideally, checking for a new end
diff --git a/mythtv/programs/mythfrontend/globalsettings.cpp b/mythtv/programs/mythfrontend/globalsettings.cpp
index 7a4e01d..1281b5d 100644
--- a/mythtv/programs/mythfrontend/globalsettings.cpp
+++ b/mythtv/programs/mythfrontend/globalsettings.cpp
@@ -2318,18 +2318,6 @@ static GlobalSpinBox *GRWSRecPriority()
return bs;
}
-static GlobalSpinBox *GRAutoRecPriority()
-{
- GlobalSpinBox *bs = new GlobalSpinBox("AutoRecPriority", -99, 99, 1);
- bs->setLabel(QObject::tr("Automatic priority range (+/-)"));
- bs->setHelpText(QObject::tr("Up to this number of priority points may "
- "be added for titles that are usually watched soon after "
- "recording or subtracted for titles that are often "
- "watched several days or weeks later."));
- bs->setValue(0);
- return bs;
-}
-
static GlobalSpinBox *GRSignLangRecPriority()
{
GlobalSpinBox *bs = new GlobalSpinBox("SignLangRecPriority",
@@ -3453,7 +3441,6 @@ GeneralRecPrioritiesSettings::GeneralRecPrioritiesSettings()
sched->addChild(GRPrefInputRecPriority());
sched->addChild(GRHDTVRecPriority());
sched->addChild(GRWSRecPriority());
- sched->addChild(GRAutoRecPriority());
addChild(sched);
VerticalConfigurationGroup* access = new VerticalConfigurationGroup(false);
diff --git a/mythtv/programs/mythfrontend/programrecpriority.cpp b/mythtv/programs/mythfrontend/programrecpriority.cpp
index f497b1c..efb5759 100644
--- a/mythtv/programs/mythfrontend/programrecpriority.cpp
+++ b/mythtv/programs/mythfrontend/programrecpriority.cpp
@@ -39,7 +39,7 @@ ProgramRecPriorityInfo::ProgramRecPriorityInfo(void) :
recType(kNotRecording),
matchCount(0), recCount(0),
last_record(QDateTime()),
- avg_delay(0), autoRecPriority(0),
+ avg_delay(0),
profile("")
{
}
@@ -52,7 +52,6 @@ ProgramRecPriorityInfo::ProgramRecPriorityInfo(
recCount(other.recCount),
last_record(other.last_record),
avg_delay(other.avg_delay),
- autoRecPriority(other.autoRecPriority),
profile(other.profile)
{
}
@@ -69,7 +68,6 @@ void ProgramRecPriorityInfo::clone(
recCount = other.recCount;
last_record = other.last_record;
avg_delay = other.avg_delay;
- autoRecPriority = other.autoRecPriority;
profile = other.profile;
}
}
@@ -86,7 +84,6 @@ void ProgramRecPriorityInfo::clone(
recCount = 0;
last_record = QDateTime();
avg_delay = 0;
- autoRecPriority = 0;
profile.clear();
}
}
@@ -103,7 +100,6 @@ void ProgramRecPriorityInfo::clone(
recCount = 0;
last_record = QDateTime();
avg_delay = 0;
- autoRecPriority = 0;
profile.clear();
}
}
@@ -117,7 +113,6 @@ void ProgramRecPriorityInfo::clear(void)
recCount = 0;
last_record = QDateTime();
avg_delay = 0;
- autoRecPriority = 0;
profile.clear();
}
@@ -189,10 +184,8 @@ class ProgramRecPrioritySort
bool operator()(const ProgramRecPriorityInfo *a,
const ProgramRecPriorityInfo *b) const
{
- int finalA = a->GetRecordingPriority() +
- a->autoRecPriority;
- int finalB = b->GetRecordingPriority() +
- b->autoRecPriority;
+ int finalA = a->GetRecordingPriority();
+ int finalB = b->GetRecordingPriority();
if (finalA != finalB)
{
@@ -456,7 +449,7 @@ bool ProgramRecPriority::Create()
SLOT(edit(MythUIButtonListItem*)));
m_programList->SetLCDTitles(tr("Schedule Priorities"),
- "rec_type|titlesubtitle|progpriority|finalpriority");
+ "rec_type|titlesubtitle|progpriority");
m_programList->SetSearchFields("titlesubtitle");
BuildFocusList();
@@ -1185,29 +1178,19 @@ void ProgramRecPriority::changeRecPriority(int howMuch)
{
// No need to re-fill the entire list, just update this entry
int progRecPriority = pgRecInfo->GetRecordingPriority();
- int autorecpri = pgRecInfo->autoRecPriority;
- int finalRecPriority = progRecPriority +
- autorecpri;
item->SetText(QString::number(progRecPriority), "progpriority");
-
- QString msg = QString::number(progRecPriority);
- if(autorecpri != 0)
- msg += tr(" + %1 automatic priority (%2hr)")
- .arg(autorecpri).arg(pgRecInfo->avg_delay);
- item->SetText(msg, "recpriority");
+ item->SetText(QString::number(progRecPriority), "recpriority");
if (m_recPriorityText)
- m_recPriorityText->SetText(msg);
+ m_recPriorityText->SetText(QString::number(progRecPriority));
- item->SetText(QString::number(progRecPriority +
- autorecpri), "recpriorityB");
+ item->SetText(QString::number(progRecPriority), "recpriorityB");
if (m_recPriorityBText)
- m_recPriorityBText->SetText(QString::number(progRecPriority +
- autorecpri));
+ m_recPriorityBText->SetText(QString::number(progRecPriority));
- item->SetText(QString::number(finalRecPriority), "finalpriority");
+ item->SetText(QString::number(progRecPriority), "finalpriority");
if (m_finalPriorityText)
- m_finalPriorityText->SetText(QString::number(finalRecPriority));
+ m_finalPriorityText->SetText(QString::number(progRecPriority));
}
}
}
@@ -1233,8 +1216,6 @@ void ProgramRecPriority::FillList(void)
{
vector<ProgramInfo *> recordinglist;
- int autopriority = gCoreContext->GetNumSetting("AutoRecPriority", 0);
-
m_programData.clear();
RemoteGetAllScheduledRecordings(recordinglist);
@@ -1303,13 +1284,6 @@ void ProgramRecPriority::FillList(void)
progInfo->avg_delay = avgd;
progInfo->profile = profile;
- if (autopriority)
- progInfo->autoRecPriority =
- autopriority - (progInfo->avg_delay *
- (autopriority * 2 + 1) / 200);
- else
- progInfo->autoRecPriority = 0;
-
if (inactive)
progInfo->recstatus = rsInactive;
else if (m_conMatch[progInfo->GetRecordingRuleID()] > 0)
@@ -1433,9 +1407,6 @@ void ProgramRecPriority::UpdateList()
qVariantFromValue(progInfo));
int progRecPriority = progInfo->GetRecordingPriority();
- int autorecpri = progInfo->autoRecPriority;
- int finalRecPriority = progRecPriority +
- autorecpri;
if ((progInfo->rectype == kSingleRecord ||
progInfo->rectype == kOverrideRecord ||
@@ -1494,16 +1465,10 @@ void ProgramRecPriority::UpdateList()
item->SetText(subtitle, "scheduleinfo", state);
item->SetText(QString::number(progRecPriority), "progpriority", state);
- item->SetText(QString::number(finalRecPriority),
- "finalpriority", state);
+ item->SetText(QString::number(progRecPriority), "finalpriority", state);
- QString msg = QString::number(progRecPriority);
- if(autorecpri != 0)
- msg += tr(" + %1 automatic priority (%2hr)")
- .arg(autorecpri).arg(progInfo->avg_delay);
- item->SetText(msg, "recpriority", state);
- item->SetText(QString::number(progRecPriority + autorecpri),
- "recpriorityB", state);
+ item->SetText(QString::number(progRecPriority), "recpriority", state);
+ item->SetText(QString::number(progRecPriority), "recpriorityB", state);
QString tempDateTime = MythDate::toString(progInfo->last_record,
MythDate::kDateTimeFull | MythDate::kSimplify |
@@ -1570,11 +1535,7 @@ void ProgramRecPriority::updateInfo(MythUIButtonListItem *item)
if (!pgRecInfo)
return;
- int progRecPriority, autorecpri, finalRecPriority;
-
- progRecPriority = pgRecInfo->GetRecordingPriority();
- autorecpri = pgRecInfo->autoRecPriority;
- finalRecPriority = progRecPriority + autorecpri;
+ int progRecPriority = pgRecInfo->GetRecordingPriority();
QString subtitle;
if (pgRecInfo->subtitle != "(null)" &&
@@ -1608,21 +1569,13 @@ void ProgramRecPriority::updateInfo(MythUIButtonListItem *item)
m_schedInfoText->SetText(subtitle);
if (m_recPriorityText)
- {
- QString msg = QString::number(pgRecInfo->GetRecordingPriority());
-
- if(autorecpri != 0)
- msg += tr(" + %1 automatic priority (%2hr)")
- .arg(autorecpri).arg(pgRecInfo->avg_delay);
- m_recPriorityText->SetText(msg);
- }
+ m_recPriorityText->SetText(QString::number(progRecPriority));
if (m_recPriorityBText)
- m_recPriorityBText->SetText(QString::number(progRecPriority +
- autorecpri));
+ m_recPriorityBText->SetText(QString::number(progRecPriority));
if (m_finalPriorityText)
- m_finalPriorityText->SetText(QString::number(finalRecPriority));
+ m_finalPriorityText->SetText(QString::number(progRecPriority));
if (m_lastRecordedText)
{
diff --git a/mythtv/programs/mythfrontend/programrecpriority.h b/mythtv/programs/mythfrontend/programrecpriority.h
index 2b74c7b..061492c 100644
--- a/mythtv/programs/mythfrontend/programrecpriority.h
+++ b/mythtv/programs/mythfrontend/programrecpriority.h
@@ -50,7 +50,6 @@ class ProgramRecPriorityInfo : public RecordingInfo
int recCount;
QDateTime last_record;
int avg_delay;
- int autoRecPriority;
QString profile;
};