summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-09-04 22:20:40 +0300
committerVille Skyttä <ville.skytta@iki.fi>2011-09-04 22:20:40 +0300
commit88a2901f27cdefe18e3ffd29086319f94dbf192c (patch)
tree855054deaf22aec481b525286e9ea4f2946096d4
parent8b67cc99b2fce3e4ddf6eb65b8282010c251d8e7 (diff)
downloadvdradmin-am-88a2901f27cdefe18e3ffd29086319f94dbf192c.tar.gz
vdradmin-am-88a2901f27cdefe18e3ffd29086319f94dbf192c.tar.bz2
Support changed SVDRP LSTR output of VDR >= 1.7.21.
-rw-r--r--HISTORY1
-rwxr-xr-xvdradmind.pl28
2 files changed, 21 insertions, 8 deletions
diff --git a/HISTORY b/HISTORY
index ecb51fd..92e12f0 100644
--- a/HISTORY
+++ b/HISTORY
@@ -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;
+ }
}
#