mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
RecMenu "Timer Timeline" displays now sorted active timer
This commit is contained in:
parent
15b7074b4e
commit
509b64d78f
13
recmenus.c
13
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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user