[mythtv-users] Up-To-Date (UK) FreeSAT channel numbers?

Simon Hobson linux at thehobsons.co.uk
Sun Feb 1 07:57:11 UTC 2009


Bradley Kite wrote:

>I'm trying to work on a way to automatically map the channel-numbers
>from the scan into something more sensible, so that after a scan you
>dont have to re-do every thing again in the channel editor.

In a separate thread, I posted as script I knocked up to set the 
channel numbers for Freeview, and also set all the channels as not 
visible except the ones I'm interested in. I've since added setting 
the XML TV ids as well.

>#!/bin/bash
>
># Set MythTV channel numbers
>
>. ~/.mythtv/mysql.txt
>
>echo '
>   update channel set visible=0 ;
>   update channel set 
>visible=1,channum=1,xmltvid="north-west.bbc1.bbc.co.uk" where 
>callsign="BBC ONE" ;
>   update channel set 
>visible=1,channum=2,xmltvid="north-west.bbc2.bbc.co.uk" where 
>callsign="BBC TWO" ;
>   update channel set 
>visible=1,channum=3,xmltvid="bbcthree.bbc.co.uk" where callsign="BBC 
>THREE" ;
>   update channel set visible=1,channum=4,xmltvid="bbcfour.bbc.co.uk" 
>where callsign="BBC FOUR" ;
>   update channel set 
>visible=1,channum=5,xmltvid="granada.itv1.itv.co.uk" where 
>callsign="ITV1" ;
...
>   update channel set 
>visible=1,channum=22,xmltvid="sky-three.sky.com" where callsign="SKY 
>THREE" ;
>   update channel set visible=1,channum=23,xmltvid="" where 
>callsign="BBC NEWS" ;
>   update channel set 
>visible=1,channum=24,xmltvid="freeview.history.uktv.co.uk" where 
>callsign="UKTV History" ;
>' | mysql --database=${DBName} --user=${DBUserName} --password=${DBPassword}

callsign seems to be the primary key/identifier for the channels.

Just put the above into a file (adapt to your needs), make it 
executable, and run it. It picks up the database login from the 
Mythtv config.

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.


More information about the mythtv-users mailing list