summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-05-12 13:28:22 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-05-12 13:28:22 +0200
commit046595a803b9ae7100f7bfac9804126edd19e870 (patch)
tree80bc5cf2503c055bd7462e4add14645966a53c7f
parent81bd99a674117326a8b1a1eb7c7bb5b66f9739a6 (diff)
downloadvdr-046595a803b9ae7100f7bfac9804126edd19e870.tar.gz
vdr-046595a803b9ae7100f7bfac9804126edd19e870.tar.bz2
Now giving the start time precedence when searching for existing EPG events
-rw-r--r--HISTORY3
-rw-r--r--epg.c14
2 files changed, 10 insertions, 7 deletions
diff --git a/HISTORY b/HISTORY
index 62c47e8a..a38f4f22 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4710,3 +4710,6 @@ Video Disk Recorder Revision History
- Fixed the character #207 in fontosd for iso8859-2 (thanks to Vladimír Bárta).
- Fixed handling unknown codes when learning LIRC remote control codes (reported
by Helmut Auer).
+- Since some channels (especially the Austrian ORF) randomly change the ids of their
+ EPG events, VDR now gives the start time precedence when searching for existing
+ events.
diff --git a/epg.c b/epg.c
index cb38a983..96c43e54 100644
--- a/epg.c
+++ b/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.73 2006/05/07 09:13:36 kls Exp $
+ * $Id: epg.c 1.74 2006/05/12 13:25:44 kls Exp $
*/
#include "epg.h"
@@ -712,12 +712,12 @@ const cEvent *cSchedule::GetFollowingEvent(void) const
const cEvent *cSchedule::GetEvent(tEventID EventID, time_t StartTime) const
{
- // Returns either the event info with the given EventID or, if that one can't
- // be found, the one with the given StartTime (or NULL if neither can be found)
- cEvent *pt = eventsHashID.Get(EventID);
- if (!pt && StartTime > 0) // 'StartTime < 0' is apparently used with NVOD channels
- pt = eventsHashStartTime.Get(StartTime);
- return pt;
+ // Returns the event info with the given StartTime or, if no actual StartTime
+ // is given, the one with the given EventID.
+ if (StartTime > 0) // 'StartTime < 0' is apparently used with NVOD channels
+ return eventsHashStartTime.Get(StartTime);
+ else
+ return eventsHashID.Get(EventID);
}
const cEvent *cSchedule::GetEventAround(time_t Time) const