mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed getting the present EPG event in case none is currently 'running'
This commit is contained in:
parent
51be693f62
commit
3dd002cc2b
2
HISTORY
2
HISTORY
@ -4436,3 +4436,5 @@ Video Disk Recorder Revision History
|
||||
disk space (reported by Jan Lenz).
|
||||
- Fixed handling repeating VPS timers (they stopped recording too early).
|
||||
- Timer log messages now show "VPS" if this is a VPS timer.
|
||||
- Fixed getting the present EPG event in case none is currently 'running' (it
|
||||
then returns the one that just ended).
|
||||
|
6
epg.c
6
epg.c
@ -7,7 +7,7 @@
|
||||
* Original version (as used in VDR before 1.3.0) written by
|
||||
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
|
||||
*
|
||||
* $Id: epg.c 1.65 2006/02/28 13:56:05 kls Exp $
|
||||
* $Id: epg.c 1.66 2006/03/25 11:43:00 kls Exp $
|
||||
*/
|
||||
|
||||
#include "epg.h"
|
||||
@ -677,8 +677,10 @@ const cEvent *cSchedule::GetPresentEvent(void) const
|
||||
const cEvent *pe = NULL;
|
||||
time_t now = time(NULL);
|
||||
for (cEvent *p = events.First(); p; p = events.Next(p)) {
|
||||
if (p->StartTime() <= now && now < p->EndTime())
|
||||
if (p->StartTime() <= now)
|
||||
pe = p;
|
||||
else if (p->StartTime() > now + 3600)
|
||||
break;
|
||||
if (p->SeenWithin(RUNNINGSTATUSTIMEOUT) && p->RunningStatus() >= SI::RunningStatusPausing)
|
||||
return p;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user