vdr create zerosize info.vdr

Message ID 1123699280.6422.17.camel@wopr.deltab.de
State New
Headers

Commit Message

Andreas Brachold Aug. 10, 2005, 6:41 p.m. UTC
  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

Cu,
Andreas
  

Patch

diff -Nur vdr-1.3.28-org/recording.c vdr-1.3.28my/recording.c
--- vdr-1.3.28-org/recording.c	2005-08-06 11:53:21.000000000 +0200
+++ vdr-1.3.28my/recording.c	2005-08-10 19:46:45.000000000 +0200
@@ -425,6 +425,9 @@ 
   lifetime = Timer->Lifetime();
   // handle info:
   info = new cRecordingInfo(Event);
+  // Set data ifn't defined from associated Event
+  if (isempty(info->Title()))
+     info->SetData(Timer->File(), NULL, Timer->Summary());
   // 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: