[vdr] vdr create zerosize info.vdr

Klaus Schmidinger Klaus.Schmidinger at cadsoft.de
Sat Aug 13 16:37:41 CEST 2005

Andreas Brachold wrote:
> Hi,
> I'm notice, that's vdr(1.3.28) create a empty info.vdr for recordings 
> on some cases. (A file with 0 bytes size)
> I think follow cause are responsible, the eye-catching timer was create
> on channel without epg data (Event are undefined) and this timer was
> defined without summary.
> the attached file, should fix this

Using Timer->File() could result in something like "TITLE~EPISODE"
(literally!). If at all, the 'name' variable should be used here.
But since this wouldn't introduce any new information (and would
also make it impossible to tell whether there actually was EPG
info available) I'd rather not do this.

However, you're of course right about the empty files that are
created if there is no EPG info. This made me realize that in
such a case not even the channel id is set, which _is_ known
even without EPG info. I have therefore made the attached change,
which makes sure there is a channel id in the info.vdr file - and
thus also avoids empty files.

-------------- next part --------------
--- recording.h	2005/05/28 09:34:07	1.38
+++ recording.h	2005/08/13 14:09:50
@@ -40,7 +40,7 @@
   tChannelID channelID;
   const cEvent *event;
   cEvent *ownEvent;
-  cRecordingInfo(const cEvent *Event = NULL);
+  cRecordingInfo(tChannelID ChannelID = tChannelID::InvalidID, const cEvent *Event = NULL);
   void SetData(const char *Title, const char *ShortText, const char *Description);
--- recording.c	2005/08/06 09:53:21	1.110
+++ recording.c	2005/08/13 14:00:48
@@ -220,11 +220,11 @@
 // --- cRecordingInfo --------------------------------------------------------
-cRecordingInfo::cRecordingInfo(const cEvent *Event)
+cRecordingInfo::cRecordingInfo(tChannelID ChannelID, const cEvent *Event)
+  channelID = ChannelID;
   if (Event) {
      event = Event;
-     channelID = event->ChannelID();
      ownEvent = NULL;
@@ -424,7 +424,7 @@
   priority = Timer->Priority();
   lifetime = Timer->Lifetime();
   // handle info:
-  info = new cRecordingInfo(Event);
+  info = new cRecordingInfo(Timer->Channel()->GetChannelID(), 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:

More information about the vdr mailing list