diff options
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/drakdvb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/standalone/drakdvb b/perl-install/standalone/drakdvb index b4f1e2010..222dfd51e 100755 --- a/perl-install/standalone/drakdvb +++ b/perl-install/standalone/drakdvb @@ -94,16 +94,17 @@ sub detect_channels() { } sub load_channels() { - @{$channel_list->{data}} = (); + my @channels; open(my $CHANNELCONF, "<$config_file"); local $_; while (<$CHANNELCONF>) { my $line = $_; if ($line =~ /^([^:]*?)(\([^(:]*\))?:/) { - push @{$channel_list->{data}}, [ $1, $1 . $2 ]; + push @channels, [ $1, $1 . $2 ]; } } close($CHANNELCONF); + @{$channel_list->{data}} = sort { $a->[0] cmp $b->[0] } @channels; if (defined @{$channel_list->{data}}[0]) { $channel_list->select(0); } |