Mailing List archive

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

[vdr] Re: old channel list convertor



Paul Lacatus wrote:
> After a long period of using vdr 1.0.4 and inactivity on the list I
> want to try the new developement line. First problem is that my old
> channels.conf file does not work anymore. Dxandy.de give me a
> channels.conf in the same old format. Is there a posibility to
> convert the old  to the new format automaticaly ? A script or
> something?

Try the following script:

chconv < channels.conf.old > channels.conf.new

---------------------------  snip  --------------------------------
#!/usr/bin/perl

%translate =
  (
    "0" => "S19.2E",
    "1" => "S13E",
  );

$index = 3;


while (<>)
{
    #name:freq:para:src:srate:vpid:apid:tpid:cond:sid
    @fields = split /:/;
    if (@fields != 10 && @fields != 13)
    {
        print;
    }
    else
    {
        if ($translate{$fields[$index]})
        {
            $fields[$index] = $translate{$fields[$index]};
        }
        if (@fields < 13)
        {
            chop $fields[9];
            $fields[10] = "0";
            $fields[11] = "0";
            $fields[12] = "0\n";
        }
        print join ':', @fields;
    }
}
---------------------------  snip  --------------------------------

When you start vdr 1.1.x for the first time with the new configuration,
you should check whether vdr complains about some lines in channels.conf.
In this case you have duplicate entries in your channels.conf.
Incrementing the last field ('radio id') will fix this.

Oliver


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



Home | Main Index | Thread Index