summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave <vdr@pickles.me.uk>2009-11-23 18:19:32 +0000
committerDave <vdr@pickles.me.uk>2009-11-23 18:19:32 +0000
commitf94a96edc766b01b9c97938db4e111de88fe4d83 (patch)
tree36e07edc524c4c132fdcdec67358ac836e3a72a9
parentb6ba2bc54da37331ec740283c7da1e29318a30bf (diff)
downloadvdrtva-f94a96edc766b01b9c97938db4e111de88fe4d83.tar.gz
vdrtva-f94a96edc766b01b9c97938db4e111de88fe4d83.tar.bz2
Create new series link timers with VPS.
-rwxr-xr-xseries.pl21
1 files changed, 14 insertions, 7 deletions
diff --git a/series.pl b/series.pl
index f58d8c7..99f0866 100755
--- a/series.pl
+++ b/series.pl
@@ -24,14 +24,20 @@ use Socket;
use POSIX;
my (%CONFIG);
-$CONFIG{VDR_HOST} = "localhost"; # Name or IP address of VDR server
-$CONFIG{VDR_PORT} = 2001; # SVDRP port on VDR server
-$CONFIG{SERIES_TIMEOUT} = 30; # Expiry time of a series (days)
-$CONFIG{START_PADDING} = 1; # Padding when creating new timers
+$CONFIG{VDR_HOST} = "localhost"; # Name or IP address of VDR server
+$CONFIG{VDR_PORT} = 2001; # SVDRP port on VDR server
+$CONFIG{SERIES_TIMEOUT} = 30; # Expiry time of a series (days)
+$CONFIG{START_PADDING} = 1; # Padding when creating new timers without VPS
$CONFIG{STOP_PADDING} = 3;
-$CONFIG{PRIORITY} = 99; # Recording priority and lifetime
+$CONFIG{PRIORITY} = 99; # Recording priority and lifetime
$CONFIG{LIFETIME} = 99;
-$CONFIG{LINKSDIR} = "/video/video"; # Directory holding links file
+$CONFIG{LINKSDIR} = "/video/video"; # Directory holding links file
+$CONFIG{VPS} = 1; # 1 = control timer from EIT running status
+
+if ($CONFIG{VPS}) {
+ $CONFIG{START_PADDING} = 0;
+ $CONFIG{VPS} = 1;
+}
my (@timers, @chans, @epg);
my %links = {};
@@ -112,8 +118,9 @@ sub check_links {
my $fstart = strftime("%Y-%m-%d:%H%M", localtime($st-$CONFIG{START_PADDING}*60));
my $fend = strftime("%H%M", localtime($et+$CONFIG{STOP_PADDING}*60));
my $title = get_title($sid,$st);
+ my $flag = 1 + 4*$CONFIG{VPS};
print STDOUT "New timer set for $scrid, \"$title\" at $fstart\n";
- set_timer ("1:$sid:$fstart:$fend:$CONFIG{PRIORITY}:$CONFIG{LIFETIME}:$title:");
+ set_timer ("$flag:$sid:$fstart:$fend:$CONFIG{PRIORITY}:$CONFIG{LIFETIME}:$title:");
my ($last_t,$val) = split(';', $links{$scrid});
$links{$scrid} = "$st;$val:$icrid";
$count++;