[Announce] xxv-1.3 - Feature release (1.4 rc)

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

Commit Message

Andreas Brachold May 5, 2009, 3:20 p.m. UTC
  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
  

Patch

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);