From patchwork Sat Oct 1 10:16:44 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Schmidinger X-Patchwork-Id: 12050 Received: from tiger.cadsoft.de ([217.7.101.210]) by www.linuxtv.org with esmtp (Exim 4.50) id 1ELeQC-0000a1-CU for vdr@linuxtv.org; Sat, 01 Oct 2005 12:16:48 +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 j91AGkrc010605 for ; Sat, 1 Oct 2005 12:16:47 +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 j91AGjPQ003507 for ; Sat, 1 Oct 2005 12:16:46 +0200 Message-ID: <433E620C.2010107@cadsoft.de> Date: Sat, 01 Oct 2005 12:16:44 +0200 From: Klaus Schmidinger Organization: CadSoft Computer GmbH User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716) X-Accept-Language: en MIME-Version: 1.0 To: vdr@linuxtv.org Subject: Re: [vdr] [bug vdr-1.3.33] invalid LastReplayed() opens first folder References: <43373419.8070001@gmx.de> In-Reply-To: <43373419.8070001@gmx.de> X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-2.0 (tiger.cadsoft.de [217.7.101.210]); Sat, 01 Oct 2005 12:16:47 +0200 (CEST) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (raven.cadsoft.de [192.168.1.1]); Sat, 01 Oct 2005 12:16:46 +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, 01 Oct 2005 10:16:48 -0000 Status: O X-Status: X-Keywords: X-UID: 5251 Udo Richter wrote: > Hi Klaus, > > I've found a minor bug in the new cMenuRecordings. > > If the recordings menu is opened with OpenSubMenus=true and with > cReplayControl::LastReplayed() pointing to a non-existing recording, VDR > descends into the first recording sub menu, provide that the first > recording menu item is a sub-menu, not a recording. > ... The attached patch should fix this. It also avoids an unjustified "Error while accessing recording!" after deleting a recording from a subfolder. Klaus --- menu.c 2005/09/25 13:37:21 1.362 +++ menu.c 2005/10/01 10:12:32 @@ -1513,6 +1513,7 @@ SetCurrent(First()); else if (OpenSubMenus && cReplayControl::LastReplayed() && Open(true)) return; + Display(); SetHelpKeys(); } @@ -1556,7 +1557,7 @@ if (Refresh) { cMenuRecordingItem *ri = (cMenuRecordingItem *)Get(Current()); if (ri) { - cRecording *Recording = GetRecording(ri); + cRecording *Recording = Recordings.GetByName(ri->FileName()); if (Recording) CurrentRecording = Recording->FileName(); } @@ -1583,7 +1584,8 @@ } } free(LastItemText); - Display(); + if (Refresh) + Display(); } cRecording *cMenuRecordings::GetRecording(cMenuRecordingItem *Item)