diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-02-25 12:09:22 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-02-25 12:09:22 +0100 |
commit | bc2e59909fed6772360effd9d11ccae65af26a02 (patch) | |
tree | 84ccf0ff770152e4b15b4e0051c567537be801b8 /recording.c | |
parent | 6b747233362eccf5e6f9609e852f7f1cb42c49b1 (diff) | |
download | vdr-bc2e59909fed6772360effd9d11ccae65af26a02.tar.gz vdr-bc2e59909fed6772360effd9d11ccae65af26a02.tar.bz2 |
The 'summary' field of a timer definition has been renamed to 'aux'
Diffstat (limited to 'recording.c')
-rw-r--r-- | recording.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/recording.c b/recording.c index 1efa3f64..535d02ea 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.137 2006/02/19 13:09:29 kls Exp $ + * $Id: recording.c 1.138 2006/02/25 11:49:48 kls Exp $ */ #include "recording.h" @@ -261,6 +261,7 @@ cRecordingInfo::cRecordingInfo(const cChannel *Channel, const cEvent *Event) channelID = Channel ? Channel->GetChannelID() : tChannelID::InvalidID; ownEvent = Event ? NULL : new cEvent(0); event = ownEvent ? ownEvent : Event; + aux = NULL; if (Channel) { // Since the EPG data's component records can carry only a single // language code, let's see whether the channel's PID data has @@ -299,6 +300,7 @@ cRecordingInfo::cRecordingInfo(const cChannel *Channel, const cEvent *Event) cRecordingInfo::~cRecordingInfo() { delete ownEvent; + free(aux); } void cRecordingInfo::SetData(const char *Title, const char *ShortText, const char *Description) @@ -311,6 +313,12 @@ void cRecordingInfo::SetData(const char *Title, const char *ShortText, const cha ((cEvent *)event)->SetDescription(Description); } +void cRecordingInfo::SetAux(const char *Aux) +{ + free(aux); + aux = Aux ? strdup(Aux) : NULL; +} + bool cRecordingInfo::Read(FILE *f) { if (ownEvent) { @@ -329,6 +337,9 @@ bool cRecordingInfo::Read(FILE *f) channelID = tChannelID::FromString(t); } break; + case '@': free(aux); + aux = strdup(t); + break; default: if (!ownEvent->Parse(s)) { esyslog("ERROR: EPG data problem in line %d", line); return false; @@ -346,6 +357,8 @@ bool cRecordingInfo::Write(FILE *f, const char *Prefix) const if (channelID.Valid()) fprintf(f, "%sC %s\n", Prefix, *channelID.ToString()); event->Dump(f, Prefix, true); + if (aux) + fprintf(f, "%s@ %s\n", Prefix, aux); return true; } @@ -497,11 +510,7 @@ cRecording::cRecording(cTimer *Timer, const cEvent *Event) lifetime = Timer->Lifetime(); // handle info: info = new cRecordingInfo(Timer->Channel(), Event); - // this is a somewhat ugly hack to get the 'summary' information from the - // timer into the recording info, but it saves us from having to actually - // copy the entire event data: - if (!isempty(Timer->Summary())) - info->SetData(isempty(info->Title()) ? Timer->File() : NULL, NULL, Timer->Summary()); + info->SetAux(Timer->Aux()); } cRecording::cRecording(const char *FileName) |