Permalink
Browse files

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.
  • Loading branch information...
gigem committed Dec 6, 2012
1 parent 8158cf7 commit 9aaed0b75635884bbdbdfb29bcaf2631bd2a5ad5
@@ -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
@@ -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);
@@ -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)
{
@@ -50,7 +50,6 @@ class ProgramRecPriorityInfo : public RecordingInfo
int recCount;
QDateTime last_record;
int avg_delay;
int autoRecPriority;
QString profile;
};

0 comments on commit 9aaed0b

Please sign in to comment.