mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Enhanced logging EPG event data
This commit is contained in:
parent
daaab1dfc8
commit
8a3dae1e8b
1
HISTORY
1
HISTORY
@ -4443,3 +4443,4 @@ Video Disk Recorder Revision History
|
||||
- Updated the Russian OSD texts (thanks to Oleg Roitburd).
|
||||
- Made cMenuRecordings::GetRecording() 'protected' (suggested by Marius Heidenstecker).
|
||||
- Speeded up cRemux::ScanVideoPacket() (thanks to Reinhard Nissl).
|
||||
- Enhanced logging EPG event data.
|
||||
|
12
epg.c
12
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 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)) {
|
||||
|
3
epg.h
3
epg.h
@ -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.h 1.33 2006/02/26 13:58:57 kls Exp $
|
||||
* $Id: epg.h 1.34 2006/03/25 12:39:39 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __EPG_H
|
||||
@ -103,6 +103,7 @@ public:
|
||||
void SetDuration(int Duration);
|
||||
void SetVps(time_t Vps);
|
||||
void SetSeen(void);
|
||||
cString ToDescr(void) const;
|
||||
void Dump(FILE *f, const char *Prefix = "", bool InfoOnly = false) const;
|
||||
bool Parse(char *s);
|
||||
static bool Read(FILE *f, cSchedule *Schedule);
|
||||
|
10
timers.c
10
timers.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: timers.c 1.53 2006/03/25 11:41:24 kls Exp $
|
||||
* $Id: timers.c 1.54 2006/03/25 12:43:59 kls Exp $
|
||||
*/
|
||||
|
||||
#include "timers.h"
|
||||
@ -492,12 +492,8 @@ void cTimer::SetEventFromSchedule(const cSchedules *Schedules)
|
||||
void cTimer::SetEvent(const cEvent *Event)
|
||||
{
|
||||
if (event != Event) { //XXX TODO check event data, too???
|
||||
if (Event) {
|
||||
char vpsbuf[64] = "";
|
||||
if (Event->Vps())
|
||||
sprintf(vpsbuf, "(VPS: %s) ", *Event->GetVpsString());
|
||||
isyslog("timer %s set to event %s %s-%s %s'%s'", *ToDescr(), *Event->GetDateString(), *Event->GetTimeString(), *Event->GetEndTimeString(), vpsbuf, Event->Title());
|
||||
}
|
||||
if (Event)
|
||||
isyslog("timer %s set to event %s", *ToDescr(), *Event->ToDescr());
|
||||
else
|
||||
isyslog("timer %s set to no event", *ToDescr());
|
||||
event = Event;
|
||||
|
Loading…
Reference in New Issue
Block a user