summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Engel <dengel@mythtv.org>2011-08-16 19:51:32 (GMT)
committer David Engel <dengel@mythtv.org>2011-08-16 19:51:32 (GMT)
commitc502e0d2b17482f75847b78a19c12eaa7fcb77d1 (patch)
tree7a00469592e98b548222d5d7932609fee98df509
parent515171d0ea615eb3dd99ee95f737690cae716bab (diff)
Fix scheduler output ordering.
Backport of 8b9c5953 and 20abad44 to fixes/0.24.
-rw-r--r--mythtv/programs/mythbackend/scheduler.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/mythtv/programs/mythbackend/scheduler.cpp b/mythtv/programs/mythbackend/scheduler.cpp
index c9837fe..11ed776 100644
--- a/mythtv/programs/mythbackend/scheduler.cpp
+++ b/mythtv/programs/mythbackend/scheduler.cpp
@@ -279,7 +279,11 @@ static bool comp_recstart(RecordingInfo *a, RecordingInfo *b)
return a->GetRecordingEndTime() < b->GetRecordingEndTime();
if (a->GetChannelSchedulingID() != b->GetChannelSchedulingID())
return a->GetChannelSchedulingID() < b->GetChannelSchedulingID();
- return a->GetRecordingStatus() < b->GetRecordingStatus();
+ if (a->GetRecordingStatus() != b->GetRecordingStatus())
+ return a->GetRecordingStatus() < b->GetRecordingStatus();
+ if (a->GetChanNum() != b->GetChanNum())
+ return a->GetChanNum() < b->GetChanNum();
+ return a->GetChanID() < b->GetChanID();
}
static QDateTime schedTime;
@@ -325,17 +329,6 @@ static bool comp_priority(RecordingInfo *a, RecordingInfo *b)
return a->GetRecordingRuleID() < b->GetRecordingRuleID();
}
-static bool comp_timechannel(RecordingInfo *a, RecordingInfo *b)
-{
- if (a->GetRecordingStartTime() != b->GetRecordingStartTime())
- return a->GetRecordingStartTime() < b->GetRecordingStartTime();
- if (a->GetChanNum() == b->GetChanNum())
- return a->GetChanID() < b->GetChanID();
- if (a->GetChanNum().toInt() > 0 && b->GetChanNum().toInt() > 0)
- return a->GetChanNum().toInt() < b->GetChanNum().toInt();
- return a->GetChanNum() < b->GetChanNum();
-}
-
bool Scheduler::FillRecordList(bool doLock)
{
schedMoveHigher = (bool)gCoreContext->GetNumSetting("SchedMoveHigher");
@@ -1519,8 +1512,6 @@ bool Scheduler::getAllPending(RecList *retList)
retList->push_back(new RecordingInfo(**it));
}
- SORT_RECLIST(*retList, comp_timechannel);
-
return hasconflicts;
}