diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2008-04-07 17:43:02 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2008-04-07 17:43:02 +0000 |
| commit | 07a8421cdf6fd70d217de1b1b6367752a4b42620 (patch) | |
| tree | 22d3aeb698e7cb1bb719eeadf1a260eed255a236 /lib | |
| parent | 74886e72841a2188b082a80b892270a1fe69df2b (diff) | |
| download | xxv-07a8421cdf6fd70d217de1b1b6367752a4b42620.tar.gz xxv-07a8421cdf6fd70d217de1b1b6367752a4b42620.tar.bz2 | |
* RECORDS: info.vdr parse field 'V' VPS/PDC time into database
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/XXV/MODULES/RECORDS.pm | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/lib/XXV/MODULES/RECORDS.pm b/lib/XXV/MODULES/RECORDS.pm index 51d6dea..74d6da7 100644 --- a/lib/XXV/MODULES/RECORDS.pm +++ b/lib/XXV/MODULES/RECORDS.pm @@ -1065,6 +1065,9 @@ sub readinfo { elsif($zeile =~ /^S\s+(.+)$/s) { $info->{subtitle} = $1; } + elsif($zeile =~ /^V\s+(.+)$/s) { + $info->{vpstime} = $1; + } elsif($zeile =~ /^X\s+1\s+(.+)$/s) { $info->{video} = $1; } @@ -1120,6 +1123,12 @@ sub saveinfo { undef $info->{channel}; } } + elsif($zeile =~ /^V\s+(\S+)/s) { + if(defined $info->{vpstime} && $info->{vpstime}) { + $out .= "V ". $info->{vpstime} . "\n" if($info->{vpstime}); + undef $info->{vpstime}; + } + } elsif($zeile =~ /^X\s+1\s+(.+)$/s) { if(defined $info->{video} && $info->{video}) { $out .= "X 1 ". $info->{video} . "\n" if($info->{video}); @@ -1153,6 +1162,9 @@ sub saveinfo { if(defined $info->{description} && $info->{description}) { $out .= "D ". $info->{description} . "\n"; } + if(defined $info->{vpstime} && $info->{vpstime}) { + $out .= "V ". $info->{vpstime} . "\n" if($info->{vpstime}); + } if(defined $info->{video} && $info->{video}) { $out .= "X 1 ". $info->{video} . "\n" if($info->{video}); } @@ -1369,6 +1381,7 @@ sub createOldEventId { channel => $info->{channel} || "<undef>", duration => $duration, starttime => $start, + vpstime => $info->{vpstime} || 0, video => $info->{video} || "", audio => $info->{audio} || "", }; @@ -1380,8 +1393,8 @@ sub createOldEventId { my $sth = $obj->{dbh}->prepare( q|REPLACE INTO OLDEPG(eventid, title, subtitle, description, channel_id, - duration, tableid, starttime, video, audio, addtime) - VALUES (?,?,?,?,?,?,?,FROM_UNIXTIME(?),?,?,NOW())|); + duration, tableid, starttime, vpstime, video, audio, addtime) + VALUES (?,?,?,?,?,?,?,FROM_UNIXTIME(?),FROM_UNIXTIME(?),?,?,NOW())|); $sth->execute( $attr->{eventid}, @@ -1392,6 +1405,7 @@ q|REPLACE INTO OLDEPG(eventid, title, subtitle, description, channel_id, int($attr->{duration}), $attr->{tableid}, $attr->{starttime}, + $attr->{vpstime}, $attr->{video}, $attr->{audio} ); @@ -2042,6 +2056,9 @@ WHERE $data->{title} =~s#^~##g; $data->{title} =~s#~$##g; + # Keep PDC Time + $data->{vpstime} = $status->{vpstime} if($status->{vpstime}); + if($data->{title} ne $rec->{title} or $data->{description} ne $status->{description} or $data->{channel} ne $status->{channel} |
