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();
|
timersToday.clear();
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
LOCK_TIMERS_READ;
|
LOCK_TIMERS_READ;
|
||||||
// const cTimers* timers = Timers;
|
const cTimers* timers = Timers;
|
||||||
for (const cTimer *t = Timers->First(); t; t = Timers->Next(t)) {
|
|
||||||
#else
|
#else
|
||||||
for (const cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
|
const cTimers* timers = &Timers;
|
||||||
#endif
|
#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))) {
|
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();
|
numTimersToday = timersToday.size();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user