From patchwork Tue May 5 15:20:14 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Brachold X-Patchwork-Id: 12726 Received: from web3.dns-net.de ([212.91.253.234]) by mail.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1M1MRP-00032U-GH for vdr@linuxtv.org; Tue, 05 May 2009 17:20:21 +0200 Received: from wopr.deltab.de (n114-052.dsl.de.inter.net [213.73.114.52]) (authenticated bits=0) by web3.dns-net.de (8.13.1/8.13.1) with ESMTP id n45FKFrj003451 for ; Tue, 5 May 2009 17:20:15 +0200 Received: from andreas by wopr.deltab.de with local (Exim 4.69) (envelope-from ) id 1M1MRL-00015O-3R for vdr@linuxtv.org; Tue, 05 May 2009 17:20:15 +0200 From: Andreas Brachold To: VDR Mailing List In-Reply-To: <4A000A29.8080704@needful.de> References: <1239634726.4330.6.camel@wopr.deltab.de> <49FFFF98.5040100@needful.de> <4A000A29.8080704@needful.de> Date: Tue, 05 May 2009 17:20:14 +0200 Message-Id: <1241536814.3842.60.camel@wopr.deltab.de> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 X-LSpam-Score: -3.2 (---) X-LSpam-Report: No, score=-3.2 required=5.0 tests=AWL=0.428, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1 autolearn=ham Subject: Re: [vdr] [Announce] xxv-1.3 - Feature release (1.4 rc) X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2009 15:20:21 -0000 Status: O X-Status: X-Keywords: X-UID: 20327 Am Dienstag, den 05.05.2009, 11:43 +0200 schrieb Marco Göbenich: > > Got a problem with the OLDEPG data using two VDR's. > > While each reads the EPG from it's channels it uses some 32 bit > > integer as eventid, but this eventid is not unique when using more than > > one VDR, so in my OLDEPG table are double epgeventid's stored. > > This results in double displayed recordings, one with the right data and > > one with the wrong data. The xxv-eventid are merged by channel-id and vdr-eventid, and should be unique if data(NID-TID-SID) from channel unique ... What is the biggest eventid from EPG, i think it's could overlapping with older recordings id. mysql> SELECT SQL_CACHE max(eventid) from EPG; Maybe help the attached patch, it's separating eventid between EPG and recordings more precisely. Table OLDEPG should deleted, #> /etc/init.d/xxvd stop #> mysql -u root xxv -e "delete from OLDEPG;" #> /etc/init.d/xxvd start Andreas Index: EPG.pm =================================================================== --- EPG.pm (Revision 1413) +++ EPG.pm (Arbeitskopie) @@ -536,6 +536,7 @@ # Make a fix format 0xCCCCEEEE : C-Channelid (high-word), E-Eventid(low-word) => real-eventid = uniqueid & FFFF my $eventid = (($vid & 0xFF) << 24) | ((($id[-3] + $id[-2] + $id[-1]) & 0x3FFF) << 16) | ($epgid & 0xFFFF); + $eventid &= 0x6FFFFFFF; # Keep 0x70000000 .... free for recording events return $eventid; } Index: RECORDS.pm =================================================================== --- RECORDS.pm (Revision 1413) +++ RECORDS.pm (Arbeitskopie) @@ -1680,7 +1680,7 @@ }; $attr->{eventid} = $self->{dbh}->selectrow_arrayref('SELECT SQL_CACHE max(eventid)+1 from OLDEPG')->[0]; - $attr->{eventid} = 1000000000 if(not defined $attr->{eventid} or $attr->{eventid} < 1000000000 ); + $attr->{eventid} = 0x70000000 if(not defined $attr->{eventid} or $attr->{eventid} < 0x6FFFFFFF ); lg sprintf('Create event "%s" into OLDEPG', $subtitle ? $title .'~'. $subtitle : $title);