From be8c52fbac04ede51b7c3e353106d66cd15df681 Mon Sep 17 00:00:00 2001 From: Andreas Brachold Date: Fri, 24 Aug 2007 18:32:52 +0000 Subject: * RECORDS: Fix parse channel data from info.vdr(1.5.x) * footer.tmpl : Link to project page --- lib/XXV/MODULES/RECORDS.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/XXV/MODULES/RECORDS.pm b/lib/XXV/MODULES/RECORDS.pm index fc9395d..f1f354d 100644 --- a/lib/XXV/MODULES/RECORDS.pm +++ b/lib/XXV/MODULES/RECORDS.pm @@ -866,7 +866,7 @@ sub videoInfo { $status->{summary} =~ s/^\s+//; # no leading white space $status->{summary} =~ s/\s+$//; # no trailing white space } - elsif($zeile =~ /^C\s+(.+)$/s) { + elsif($zeile =~ /^C\s+(\S+)/s) { $status->{channel} = $1; $status->{type} = $cmod->getChannelType($status->{channel}); } @@ -1549,7 +1549,7 @@ WHERE $desc =~ s/^\s+//; # no leading white space $desc =~ s/\s+$//; # no trailing white space } - elsif($zeile =~ /^C\s+(.+)$/s) { + elsif($zeile =~ /^C\s+(\S+)/s) { $channel = $1; } elsif($zeile =~ /^X\s+1\s+(.+)$/s) { @@ -1678,7 +1678,7 @@ WHERE undef $data->{summary}; } } - elsif($zeile =~ /^C\s+(.+)$/s) { + elsif($zeile =~ /^C\s+(\S+)/s) { if(defined $data->{channel} && $data->{channel}) { $data->{channel} =~ s/^\s+//; $data->{channel} =~ s/\s+$//; @@ -1939,7 +1939,8 @@ sub IdToPath { my $sth = $obj->{dbh}->prepare('select Path from RECORDS where RecordMD5 = ?'); $sth->execute($id) or return error sprintf("Can't execute query: %s.",$sth->errstr); - return $sth->fetchrow_hashref()->{Path}; + my $erg = $sth->fetchrow_hashref(); + return $erg ? $erg->{Path} : undef; } # ------------------ -- cgit v1.2.3