[mythtv-users] Channel sort/delete

Simon Hobson linux at thehobsons.co.uk
Sat Nov 8 18:37:44 UTC 2014


Thomas Boehm <mythtv-users at lists.boehmi.net> wrote:

> Make a list of the channels you want and the channel numbers you want to
> assigb to them and write your own script based on this one
> https://www.mythtv.org/wiki/Database_editing_script
> 
> It basically hides all channels first, adds 10000 to the channel number,
> then makes the ones you want visible again and assigns the channel
> number of your choice to it.
> 
> It's a bit of work to set it up for the first time, but after that you
> just run the script every time you scan for new channels.

There's a bit more to it than that.

One way is hinted at on https://www.mythtv.org/wiki/UK_Channel_Assignments
Have one script per input, I'm assuming the OP has multiple inputs (sounds like 3 different sats), and hence the changes are a bit more complicated.
So scan one input (one receiver), then run one script to move those channels out of the way. It need only be "set channum=channum+10000 where channum<10000"
Scan the next one, and move those channels out of the way - eg move them up to 20,000+
Ditto with the third.
As long as you always scan te inputs in the same order then you've have your channels in predictable ranges.

Lastly, run a script which organises the channels - delete stuff you definitely will never want, make invisible any that you don't want but might want to take a look through, and shift the ones you do want down to the low numbers - along with setting things like EIT on/off, xmltv ids, etc.


The more complicated way means taking account of input number - I think it's sourceid on the table. So you can do things like :
update channel set <stuff> where sourceid=1 and callsign=<something>"



More information about the mythtv-users mailing list