The version number of EPG events is now also stored in the epg.data file

This commit is contained in:
Klaus Schmidinger 2005-12-25 11:13:33 +01:00
parent 186a3213d0
commit f94046db2e
4 changed files with 16 additions and 8 deletions

View File

@ -1562,3 +1562,6 @@ Christian Vogt <c.v@nexgo.de>
Christof Steininger <christof.steininger@t-online.de>
for fixing a possible crash when displaying the "Low disk space!" message from
a background thread
Kendy Kutzner <kutzner@ira.uka.de>
for making the version number of EPG events be stored in the epg.data file

View File

@ -3963,7 +3963,7 @@ Video Disk Recorder Revision History
commands may now be executed at any time, and the message will be displayed
(no more "pending message").
2005-12-24: Version 1.3.38
2005-12-25: Version 1.3.38
- Fixed handling second audio and Dolby Digital PIDs for encrypted channels
(was broken in version 1.3.37).
@ -3991,3 +3991,5 @@ Video Disk Recorder Revision History
and background threads won't interfere.
- The main menu now dynamically updates its contents in case an instant
recording or replay stops, etc.
- The version number of EPG events is now also stored in the epg.data file
(thanks to Kendy Kutzner).

10
epg.c
View File

@ -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)

7
vdr.5
View File

@ -8,9 +8,9 @@
.\" License as specified in the file COPYING that comes with the
.\" vdr distribution.
.\"
.\" $Id: vdr.5 1.39 2005/09/26 21:38:44 kls Exp $
.\" $Id: vdr.5 1.40 2005/12/25 11:08:40 kls Exp $
.\"
.TH vdr 5 "19 Mar 2005" "1.3.23" "Video Disk Recorder Files"
.TH vdr 5 "19 Mar 2005" "1.3.38" "Video Disk Recorder Files"
.SH NAME
vdr file formats - the Video Disk Recorder Files
.SH DESCRIPTION
@ -627,7 +627,7 @@ The following tag characters are defined:
tab (@);
l l.
\fBC\fR@<channel id> <channel name>
\fBE\fR@<event id> <start time> <duration> <table id>
\fBE\fR@<event id> <start time> <duration> <table id> <version>
\fBT\fR@<title>
\fBS\fR@<short text>
\fBD\fR@<description>
@ -654,6 +654,7 @@ l l.
<start time> @is the time (as a time_t integer) in UTC when this event starts
<duration> @is the time (in seconds) that this event will take
<table id> @is a hex number that indicates the table this event is contained in (if this is left empty or 0 this event will not be overwritten or modified by data that comes from the DVB stream)
<version> @is a hex number that indicates the event's version number inside its table (optional)
<title> @is the title of the event
<short text> @is the short text of the event (typically the name of the episode etc.)
<description> @is the description of the event (any '|' characters will be interpreted as newlines)