[mythtv-users] Computing channel.chanid

Daniel Kristjansson danielk at cuymedia.net
Tue Aug 17 02:36:22 UTC 2010


On Mon, 2010-08-16 at 20:28 -0400, Larry K wrote:
> Comcast is changing my QAM channel layout every other day it seems, so
> I'm getting tired of rescanning channels in mythtv-setup.  it's soooo
> tedious to fix all the channel numbers and xmltvids post-scan.  So, I
> borrowed a script from the HDHR forum to insert the correct channels.
>  I have it almost ready to go, except that the script is borking the
> chanid by supplying an alphanumeric value.  It needs to be numeric.
>  Does anyone know how mythtv calculates the chanid value when
> inserting a new channel?  Most of the time, it looks like some funky
> combination of (sourceid*1000) + serviceid, but not always. 

The chanid is arbitrary. There is a sourceid*1000 + int(channum)
type thing that tries to pick chanid's that humans debugging the
program will find appealing.. but it doesn't try very hard to do
so and will pick non-conflicted chanid's pretty arbitrarily if
there is any kind of collision. What is important is that the same
chanid is used in other tables referring to that channel.

--Daniel



More information about the mythtv-users mailing list