From 450c7ef1af67a308780f1df920939b5e8f2edf9b Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 25 Feb 2006 17:05:48 +0100 Subject: [PATCH] Parsing 'E' record when reading 'info.vdr' --- recording.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/recording.c b/recording.c index 535d02ea..d6f30879 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.c 1.138 2006/02/25 11:49:48 kls Exp $ + * $Id: recording.c 1.139 2006/02/25 17:05:48 kls Exp $ */ #include "recording.h" @@ -337,6 +337,22 @@ bool cRecordingInfo::Read(FILE *f) channelID = tChannelID::FromString(t); } break; + case 'E': { + unsigned int EventID; + time_t StartTime; + int Duration; + unsigned int TableID = 0; + unsigned int Version = 0xFF; + int n = sscanf(t, "%u %ld %d %X %X", &EventID, &StartTime, &Duration, &TableID, &Version); + if (n >= 3 && n <= 5) { + ownEvent->SetEventID(EventID); + ownEvent->SetStartTime(StartTime); + ownEvent->SetDuration(Duration); + ownEvent->SetTableID(TableID); + ownEvent->SetVersion(Version); + } + } + break; case '@': free(aux); aux = strdup(t); break;