diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2017-04-02 12:13:15 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2017-04-02 12:13:15 +0200 |
commit | c4cc5e613ccfbf573a7ed66d17702581ef00e376 (patch) | |
tree | 166bd35da0b02d7e5bc74a7c42e3d643ed319b2d /epg.c | |
parent | 0a5a7893a5d396503628a3e7997ae550ff2597ac (diff) | |
download | vdr-c4cc5e613ccfbf573a7ed66d17702581ef00e376.tar.gz vdr-c4cc5e613ccfbf573a7ed66d17702581ef00e376.tar.bz2 |
The cEvent class now has a new member 'aux'
Diffstat (limited to 'epg.c')
-rw-r--r-- | epg.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -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 4.3 2017/03/31 15:16:46 kls Exp $ + * $Id: epg.c 4.4 2017/04/02 11:34:15 kls Exp $ */ #include "epg.h" @@ -129,6 +129,7 @@ cEvent::cEvent(tEventID EventID) startTime = 0; duration = 0; vps = 0; + aux = NULL; SetSeen(); } @@ -137,6 +138,7 @@ cEvent::~cEvent() free(title); free(shortText); free(description); + free(aux); delete components; } @@ -237,6 +239,12 @@ void cEvent::SetSeen(void) seen = time(NULL); } +void cEvent::SetAux(const char *Aux) +{ + free(aux); + aux = Aux ? strdup(Aux) : NULL; +} + cString cEvent::ToDescr(void) const { char vpsbuf[64] = ""; @@ -469,6 +477,11 @@ void cEvent::Dump(FILE *f, const char *Prefix, bool InfoOnly) const } if (vps) fprintf(f, "%sV %ld\n", Prefix, vps); + if (!InfoOnly && !isempty(aux)) { + strreplace(aux, '\n', '|'); + fprintf(f, "%s@ %s\n", Prefix, aux); + strreplace(aux, '|', '\n'); + } if (!InfoOnly) fprintf(f, "%se\n", Prefix); } @@ -507,6 +520,9 @@ bool cEvent::Parse(char *s) break; case 'V': SetVps(atoi(t)); break; + case '@': strreplace(t, '|', '\n'); + SetAux(t); + break; default: esyslog("ERROR: unexpected tag while reading EPG data: %s", s); return false; } |