[mythtv] [mythtv-commits] Ticket #4963: External channel changer is only passed frequency not channum

Michael T. Dean mtdean at thirdcontact.com
Sat Mar 15 17:27:31 UTC 2008

On 03/15/2008 11:00 AM, MythTV wrote:
> #4963: External channel changer is only passed frequency not channum
>  The external channel changer program is only passed the "freqid" parameter
>  and not the "channum".  This means that it cannot be used to tune anything
>  that outputs multiple channels on the same frequency.  For example a cable
>  TV box that has only a UHF output and no composite.

The frequency is a user-configurable value meant to be the /identifier/ 
used by the external channel-change script that's used to change the 
channel.  It is /not/ required to be a frequency.  As a matter of fact, 
if you're using an external channel change script, storing a frequency 
in this field is a waste as Myth has no need for a frequency.

So, if you need to pass a frequency and a channel number, you can 
"encode" them both into the value.  You may even be able to put them 
into the freqid column as space-separated values that will be parsed by 
the shell the same as occurs after your patch.  (The existing code looks 
like that will happen fine.)  If so, fix your DB with a simple:

UPDATE channel SET freqid = CONCAT(freqid, ' ', channum);

>  The attached patch passes both the "freqid" and "channum" to the program
>  so that it can select whichever is appropriate (the first parameter is
>  unchanged so that existing scripts still work).

This change may still require that users who currently use the freqid 
properly have to change their channel change scripts (depending on the 
actual construction of the channel change scripts).  If nothing else, 
those who have simple argument number checks (i.e. if [ $# -eq 1 ]) 
would have to change their checks.

>   The patch also tunes to
>  the specified frequency if the input matches "*television*".

If you're using an external channel change script, it, IMHO, should do 
/all/ of the channel changing.


More information about the mythtv-dev mailing list