Mailing List archive

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

[vdr] Re: ANNOUNCE: vdrchannels-0.0.4



Manfred Schmidt-Voigt wrote:


[...]

But I have a problem with it. I have tested it with my actual channel
list. It has realy built up a new channel list with my order but at
the end, when I include the special command :_other it has included
all the channels again sorted in alphabetic order. During the tests I
have included also a new channel. This is also sorted beyond it first
character.
Yes it's a bug, and here is the patch (maybe the line-number differ)

--- vdrchannels_orig 2003-04-12 21:20:53.000000000 +0200
+++ vdrchannels 2003-04-14 23:45:16.000000000 +0200
@@ -112,7 +117,7 @@
sub others {
my $q2 = "";
for $ch (sort {uc($a) cmp uc($b)} keys %source) {
- next if (defined($done{ch}));
+ next if (exists($done{$ch}));
($q1 = uc($ch)) =~ s:(.).*:$1:;
if ($q1 ne $q2) {
printf(CONF ":( Others %s )\n",$q1);


And here is a little improvement I made to insert "duplicate" channel. If your vdrchannels.source hat duplicate named channels (e.g. "PREMIERE DIREKT 1"), it appends a number to the name, so you can insert them all in your vdrchannels.conf.

Maybe Ralf will use theses patches for the next version... :-)

--- vdrchannels_orig 2003-04-12 21:20:53.000000000 +0200
+++ vdrchannels 2003-04-14 23:45:16.000000000 +0200
@@ -26,6 +26,11 @@
chomp;
next if ( m/^(:|\s*#).*/ );
($channel,$param) = split(/:/,$_,2);
+ if(exists $source{"$channel"}) {
+ $count{"$channel"}++;
+ print "Duplicate $channel -> $channel.$count{$channel}\n";
+ $channel=$channel.".".$count{"$channel"};
+ }
$source{$channel} = $param;
$srline{$channel} = $.;
}


Bye,

Dirk Melchers.




--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index