summaryrefslogtreecommitdiff
path: root/epg.c
diff options
context:
space:
mode:
Diffstat (limited to 'epg.c')
-rw-r--r--epg.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/epg.c b/epg.c
index 7cf7cdbc..c67b6456 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 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;
}