diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-03-25 12:51:29 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-03-25 12:51:29 +0100 |
commit | 8a3dae1e8bc3c008abc425c026f1c1bdf1ce026d (patch) | |
tree | 12fc3d08f2e83ca2956b38749975478f8ae15be2 /epg.c | |
parent | daaab1dfc8eb0423180484aa084e0d4c7bafb319 (diff) | |
download | vdr-8a3dae1e8bc3c008abc425c026f1c1bdf1ce026d.tar.gz vdr-8a3dae1e8bc3c008abc425c026f1c1bdf1ce026d.tar.bz2 |
Enhanced logging EPG event data
Diffstat (limited to 'epg.c')
-rw-r--r-- | epg.c | 12 |
1 files changed, 10 insertions, 2 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 1.66 2006/03/25 11:43:00 kls Exp $ + * $Id: epg.c 1.67 2006/03/25 12:48:34 kls Exp $ */ #include "epg.h" @@ -157,7 +157,7 @@ void cEvent::SetVersion(uchar Version) void cEvent::SetRunningStatus(int RunningStatus, cChannel *Channel) { if (Channel && runningStatus != RunningStatus && (RunningStatus > SI::RunningStatusNotRunning || runningStatus > SI::RunningStatusUndefined) && Channel->HasTimer()) - isyslog("channel %d (%s) event %s '%s' status %d", Channel->Number(), Channel->Name(), *GetTimeString(), Title(), RunningStatus); + isyslog("channel %d (%s) event %s status %d", Channel->Number(), Channel->Name(), *ToDescr(), RunningStatus); runningStatus = RunningStatus; } @@ -208,6 +208,14 @@ void cEvent::SetSeen(void) seen = time(NULL); } +cString cEvent::ToDescr(void) const +{ + char vpsbuf[64] = ""; + if (Vps()) + sprintf(vpsbuf, "(VPS: %s) ", *GetVpsString()); + return cString::sprintf("%s %s-%s %s'%s'", *GetDateString(), *GetTimeString(), *GetEndTimeString(), vpsbuf, Title()); +} + bool cEvent::HasTimer(void) const { for (cTimer *t = Timers.First(); t; t = Timers.Next(t)) { |