diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2011-09-04 22:20:40 +0300 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-09-04 22:20:40 +0300 |
commit | 88a2901f27cdefe18e3ffd29086319f94dbf192c (patch) | |
tree | 855054deaf22aec481b525286e9ea4f2946096d4 | |
parent | 8b67cc99b2fce3e4ddf6eb65b8282010c251d8e7 (diff) | |
download | vdradmin-am-88a2901f27cdefe18e3ffd29086319f94dbf192c.tar.gz vdradmin-am-88a2901f27cdefe18e3ffd29086319f94dbf192c.tar.bz2 |
Support changed SVDRP LSTR output of VDR >= 1.7.21.
-rw-r--r-- | HISTORY | 1 | ||||
-rwxr-xr-x | vdradmind.pl | 28 |
2 files changed, 21 insertions, 8 deletions
@@ -5,6 +5,7 @@ VDR-Portal: amair ----------------------------------------------------------- 201x-xx-xx: x.x.x +- Added: Support changed SVDRP LSTR output of VDR >= 1.7.21 (Ville Skyttä). - Fixed: --log 0 command line argument (Ville Skyttä). - Improved: Startup error messages on module load failures (Ville Skyttä). - Added: -L/--logfile command line arg for overriding config (Ville Skyttä). diff --git a/vdradmind.pl b/vdradmind.pl index d8cd51b..ce18897 100755 --- a/vdradmind.pl +++ b/vdradmind.pl @@ -5076,7 +5076,11 @@ sub rec_stream { my $c; for (SendCMD("lstr")) { - ($i, $date, $time, $title) = split(/ +/, $_, 4); + if ($FEATURES{VDRVERSION} < 10721) { + ($i, $date, $time, $title) = split(/ +/, $_, 4); + } else { + ($i, $date, $time, undef, $title) = split(/ +/, $_, 5); + } last if ($id == $i); } $time = substr($time, 0, 5); # needed for wareagel-patch @@ -6027,13 +6031,21 @@ sub ParseRecordings { next if (length($recording) == 0); last if ($recording =~ /^No recordings available/); - my ($new); - my ($id, $date, $time, $name) = split(/ +/, $recording, 4); - - # - if (length($time) > 5) { - $new = 1; - $time = substr($time, 0, 5); + my ($id, $date, $time, $length, $name, $new); + if ($FEATURES{VDRVERSION} < 10721) { + # id date time* name + ($id, $date, $time, $name) = split(/ +/, $recording, 4); + if (length($time) > 5) { + $new = 1; + $time = substr($time, 0, 5); + } + } else { + # id date time length* name + ($id, $date, $time, $length, $name) = split(/ +/, $recording, 5); + if ($length =~ /^(\d+:\d+)\D/) { + $new = 1; + $length = $1; + } } # |