From patchwork Sun Feb 13 13:48:13 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Warren X-Patchwork-Id: 11777 Received: from smtp-out4.blueyonder.co.uk ([195.188.213.7]) by www.linuxtv.org with esmtp (Exim 4.34) id 1D0K72-0004IZ-2d for vdr@linuxtv.org; Sun, 13 Feb 2005 14:48:36 +0100 Received: from [192.168.0.2] ([82.41.50.81]) by smtp-out4.blueyonder.co.uk with Microsoft SMTPSVC(5.0.2195.6713); Sun, 13 Feb 2005 13:48:53 +0000 Received: from 127.0.0.1 (AVG SMTP 7.0.300 [265.8.7]); Sun, 13 Feb 2005 13:48:13 +0000 From: "Chris Warren" To: Date: Sun, 13 Feb 2005 13:48:13 -0000 MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Thread-Index: AcUR0qmC3F6jc+wsSxCz9eKHXYcHkw== Message-ID: X-OriginalArrivalTime: 13 Feb 2005 13:48:53.0944 (UTC) FILETIME=[C1A35B80:01C511D2] Subject: [vdr] Null titles and cSchedule::GetFollowingEvent X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2005 13:48:36 -0000 Status: O X-Status: X-Keywords: X-UID: 25 Hi all, I notice that quite often EPG data contains events with null or empty titles. These tend to be 'gaps' between programs (especially on movie channels.) Would it be sensible to skip over these when showing the "Whats on Next?" screen? Looking at the code, the place that needs changed is cSchedule::GetFollowingEvent in epg.c. Apart from cMenuWhatsOn::cMenuWhatsOn in menu.c, the only other place place this is called from is cSchedule::Dump - would the following patch (attached and included below) cause any problems? I've been running it for a few days and it seems ok. Or would it be better to make the change to cMenuWhatsOn::cMenuWhatsOn? Chris --- vdr-1.3.20/epg.c 2005-01-02 11:25:25.000000000 +0000 +++ vdr-1.3.20-modified/epg.c 2005-02-11 20:26:10.000000000 +0000 @@ -672,8 +672,14 @@ const cEvent *cSchedule::GetPresentEvent const cEvent *cSchedule::GetFollowingEvent(bool CheckRunningStatus) const { const cEvent *p = GetPresentEvent(CheckRunningStatus); - if (p) + if (p) { p = events.Next(p); + + const cEvent *tempp = p; + while(tempp && ((tempp->Title() == NULL) || (strlen(tempp->Title())==0))) tempp = events.Next(tempp); + if(tempp) + return tempp; + } return p; }