summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2020-01-10 10:56:55 +0100
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2020-01-10 11:05:28 +0100
commit509b64d78f963af3297fd3c6a95843f7f437a5e5 (patch)
tree44623a2f0d3bf798a238e69d8e155fdff1452c88
parent15b7074b4ef2c6d947281247e8f40c2ce85690da (diff)
downloadvdr-plugin-tvguide-509b64d78f963af3297fd3c6a95843f7f437a5e5.tar.gz
vdr-plugin-tvguide-509b64d78f963af3297fd3c6a95843f7f437a5e5.tar.bz2
RecMenu "Timer Timeline" displays now sorted active timer
-rw-r--r--recmenus.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/recmenus.c b/recmenus.c
index 21c8778..2d15082 100644
--- a/recmenus.c
+++ b/recmenus.c
@@ -1431,14 +1431,19 @@ void cRecMenuTimeline::GetTimersForDay(void) {
timersToday.clear();
#if VDRVERSNUM >= 20301
LOCK_TIMERS_READ;
-// const cTimers* timers = Timers;
- for (const cTimer *t = Timers->First(); t; t = Timers->Next(t)) {
+ const cTimers* timers = Timers;
#else
- for (const cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
+ const cTimers* timers = &Timers;
#endif
+ cSortedTimers SortedTimers(timers);
+ int i = 0;
+ while (i < SortedTimers.Size()) {
+ const cTimer *t = SortedTimers[i];
if (((t->StartTime() > timeStart) && (t->StartTime() <= timeStop)) || ((t->StopTime() > timeStart) && (t->StopTime() <= timeStop))) {
- timersToday.push_back(t);
+ if (t->HasFlags(tfActive))
+ timersToday.push_back(t);
}
+ i++;
}
numTimersToday = timersToday.size();
}