From patchwork Sat Aug 13 14:37:41 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Schmidinger X-Patchwork-Id: 11972 Received: from tiger.cadsoft.de ([217.7.101.210]) by www.linuxtv.org with esmtp (Exim 4.34) id 1E3x8r-0001ls-Si for vdr@linuxtv.org; Sat, 13 Aug 2005 16:37:45 +0200 Received: from raven.cadsoft.de (raven.cadsoft.de [217.7.101.211]) by tiger.cadsoft.de (8.12.7/8.12.7) with ESMTP id j7DEbjHS018153 for ; Sat, 13 Aug 2005 16:37:45 +0200 Received: from [192.168.100.10] (hawk.cadsoft.de [192.168.100.10]) by raven.cadsoft.de (8.13.3/8.13.3) with ESMTP id j7DEbhn5004532 for ; Sat, 13 Aug 2005 16:37:44 +0200 Message-ID: <42FE05B5.3070903@cadsoft.de> Date: Sat, 13 Aug 2005 16:37:41 +0200 From: Klaus Schmidinger Organization: CadSoft Computer GmbH User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en MIME-Version: 1.0 To: vdr@linuxtv.org Subject: Re: [vdr] vdr create zerosize info.vdr References: <1123699280.6422.17.camel@wopr.deltab.de> In-Reply-To: <1123699280.6422.17.camel@wopr.deltab.de> X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-2.0 (tiger.cadsoft.de [217.7.101.210]); Sat, 13 Aug 2005 16:37:45 +0200 (CEST) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (raven.cadsoft.de [192.168.1.1]); Sat, 13 Aug 2005 16:37:44 +0200 (CEST) X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Aug 2005 14:37:46 -0000 Status: O X-Status: X-Keywords: X-UID: 4138 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. Klaus --- 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); public: ~cRecordingInfo(); --- 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; } else @@ -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: