master-timer list of usable channels ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthias Schniedermeyer wrote:
> Gregoire Favre wrote:
>
>> Would it be possible to tell him to "only" use the channels 1 to 123 for
>> example, as autopid could add some "not usable" channels after those ?
> 
> Currently not.
> I've added a "highest-channel-number"-config-option to my todo-list.

I've taken the time to implemented that feature.

.diff attached.



Bis denn

-- 
Real Programmers consider "what you see is what you get" to be just as
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated,
cryptic, powerful, unforgiving, dangerous.

-------------- next part --------------
Index: sample/config
===================================================================
--- sample/config	(revision 203)
+++ sample/config	(working copy)
@@ -19,6 +19,9 @@
 #recorddir	= /video
 recorddir	= /video/video0
 
+# Highester channel-number (including) available for recording, 0=no restrictions
+highest_channel_number = 0
+
 # Use fast or "safe" method for sorting the timers in VDR (This option is for sorttimer.pl)
 SortFast	= 1
 
Index: timer.pl
===================================================================
--- timer.pl	(revision 222)
+++ timer.pl	(working copy)
@@ -136,6 +136,12 @@
       next;
     }
 
+    # Check if timers is within allowed channel-number-range
+    if ($$rConfig{highest_channel_number} && ($$rChannels{rev}{$channel}{instance}{$num} > $$rConfig{highest_channel_number})) {
+      print "Channel: $channel(" . $$rChannels{rev}{$channel}{short_name} . ") is out of allowed channel-number-range: No. " . $$rChannels{rev}{$channel}{instance}{$num} . "\n" if ($$rConfig{debug} & 64);
+      next;
+    }
+
     foreach $time2 (sort keys %{$$rTimer{$num}}) {
       foreach $channel2 (sort keys %{$$rTimer{$num}{$time2}}) {
 	if (($channel eq $channel2) || $$rConfig{preventdouble}) {
Index: init.pl
===================================================================
--- init.pl	(revision 211)
+++ init.pl	(working copy)
@@ -353,6 +353,7 @@
   my $conf = "(" . join ("|", (
 			       "defaultlifetime",
 			       "defaultprio",
+			       "highest_channel_number",
 			       "human_info",
 			       "joinnameifequal",
 			       "jointimers",

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux