RecMenu "Timer Timeline" displays now sorted active timer

This commit is contained in:
kamel5 2020-01-10 10:56:55 +01:00
parent 15b7074b4e
commit 509b64d78f

View File

@ -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();
}