summaryrefslogtreecommitdiff
path: root/epg.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-12-25 11:13:33 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-12-25 11:13:33 +0100
commitf94046db2e2abc33434ab4f2f4203a4f1966660d (patch)
treecc383d3557ec00092f647466e25567246466f00f /epg.c
parent186a3213d04c3a041148e14c18caa59f1a71b573 (diff)
downloadvdr-f94046db2e2abc33434ab4f2f4203a4f1966660d.tar.gz
vdr-f94046db2e2abc33434ab4f2f4203a4f1966660d.tar.bz2
The version number of EPG events is now also stored in the epg.data file
Diffstat (limited to 'epg.c')
-rw-r--r--epg.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/epg.c b/epg.c
index e6e039ce..cecc28e7 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.40 2005/11/11 13:37:43 kls Exp $
+ * $Id: epg.c 1.41 2005/12/25 11:11:17 kls Exp $
*/
#include "epg.h"
@@ -234,7 +234,7 @@ void cEvent::Dump(FILE *f, const char *Prefix, bool InfoOnly) const
{
if (InfoOnly || startTime + duration + Setup.EPGLinger * 60 >= time(NULL)) {
if (!InfoOnly)
- fprintf(f, "%sE %u %ld %d %X\n", Prefix, eventID, startTime, duration, tableID);
+ fprintf(f, "%sE %u %ld %d %X %X\n", Prefix, eventID, startTime, duration, tableID, version);
if (!isempty(title))
fprintf(f, "%sT %s\n", Prefix, title);
if (!isempty(shortText))
@@ -296,8 +296,9 @@ bool cEvent::Read(FILE *f, cSchedule *Schedule)
time_t StartTime;
int Duration;
unsigned int TableID = 0;
- int n = sscanf(t, "%u %ld %d %X", &EventID, &StartTime, &Duration, &TableID);
- if (n == 3 || n == 4) {
+ unsigned int Version = 0xFF;
+ int n = sscanf(t, "%u %ld %d %X %X", &EventID, &StartTime, &Duration, &TableID, &Version);
+ if (n >= 3 && n <= 5) {
Event = (cEvent *)Schedule->GetEvent(EventID, StartTime);
cEvent *newEvent = NULL;
if (Event)
@@ -306,6 +307,7 @@ bool cEvent::Read(FILE *f, cSchedule *Schedule)
Event = newEvent = new cEvent(EventID);
if (Event) {
Event->SetTableID(TableID);
+ Event->SetVersion(Version);
Event->SetStartTime(StartTime);
Event->SetDuration(Duration);
if (newEvent)