Script:
USE mythconverg;
UPDATE channel SET channum=1 WHERE name='BBC ONE';
UPDATE channel SET channum=2 WHERE name='BBC TWO';
UPDATE channel SET channum=3 WHERE name='ITV1';
UPDATE channel SET channum=4 WHERE name='Channel 4';
UPDATE channel SET channum=5 WHERE name='Five';
UPDATE channel SET channum=6 WHERE name='ITV2';
UPDATE channel SET channum=7 WHERE name='BBC THREE';
UPDATE channel SET channum=9 WHERE name='BBC FOUR';
UPDATE channel SET channum=10 WHERE name='ITV3';
UPDATE channel SET channum=11 WHERE name='SKY THREE';
UPDATE channel SET channum=12 WHERE name='UKTV History';
UPDATE channel SET channum=13 WHERE name='Channel 4+1';
UPDATE channel SET channum=14 WHERE name='More 4';
UPDATE channel SET channum=16 WHERE name='QVC';
UPDATE channel SET channum=18 WHERE name='The HITS';
UPDATE channel SET channum=19 WHERE name='Dave';
UPDATE channel SET channum=20 WHERE name='Virgin1';
UPDATE channel SET channum=21 WHERE name='TMF';
UPDATE channel SET channum=22 WHERE name='Ideal World';
UPDATE channel SET channum=23 WHERE name='bid tv';
UPDATE channel SET channum=24 WHERE name='price-drop tv';
UPDATE channel SET channum=28 WHERE name='ITV4';
UPDATE channel SET channum=29 WHERE name='E4';
UPDATE channel SET channum=30 WHERE name='E4+1';
UPDATE channel SET channum=31 WHERE name='ITV2 +1';
UPDATE channel SET channum=32 WHERE name='Film4';
UPDATE channel SET channum=34 WHERE name='SETANTA SPORTS';
UPDATE channel SET channum=35 WHERE name='Five US';
UPDATE channel SET channum=36 WHERE name='FIVER';
UPDATE channel SET channum=37 WHERE name='smileTV';
UPDATE channel SET channum=42 WHERE name='Nuts TV';
UPDATE channel SET channum=43 WHERE name='Gems TV';
UPDATE channel SET channum=44 WHERE name='GEMSTV1';
UPDATE channel SET channum=45 WHERE name='Lottery Xtra';
UPDATE channel SET channum=61 WHERE name='TVX / REDHOT';
UPDATE channel SET channum=70 WHERE name='CBBC Channel';
UPDATE channel SET channum=71 WHERE name='CBeebies';
UPDATE channel SET channum=75 WHERE name='CITV';
UPDATE channel SET channum=80 WHERE name='BBC NEWS';
UPDATE channel SET channum=81 WHERE name='BBC Parliament';
UPDATE channel SET channum=82 WHERE name='Sky News';
UPDATE channel SET channum=83 WHERE name='Sky Spts News';
UPDATE channel SET channum=87 WHERE name='Community';
UPDATE channel SET channum=88 WHERE name='Teachers TV';
UPDATE channel SET channum=100 WHERE name='Teletext';
UPDATE channel SET channum=101 WHERE name='Ttext Holidays';
UPDATE channel SET channum=102 WHERE name='Rabbit';
UPDATE channel SET channum=103 WHERE name='TeletextCasino';
UPDATE channel SET channum=104 WHERE name='Teletext on 4';
UPDATE channel SET channum=105 WHERE name='BBCi';
UPDATE channel SET channum=108 WHERE name='Sky Text';
UPDATE channel SET channum=300 WHERE name='4TVinteractive';
UPDATE channel SET channum=301 WHERE name='301';
UPDATE channel SET channum=302 WHERE name='302';
UPDATE channel SET channum=303 WHERE name='303';
UPDATE channel SET channum=304 WHERE name='tvtv DIGITAL';
UPDATE channel SET channum=305 WHERE name='305';
UPDATE channel SET channum=700 WHERE name='BBC Radio 1';
UPDATE channel SET channum=701 WHERE name='1Xtra BBC';
UPDATE channel SET channum=702 WHERE name='BBC Radio 2';
UPDATE channel SET channum=703 WHERE name='BBC Radio 3';
UPDATE channel SET channum=704 WHERE name='BBC Radio 4';
UPDATE channel SET channum=705 WHERE name='BBC R5 Live';
UPDATE channel SET channum=706 WHERE name='BBC 5L SportsX';
UPDATE channel SET channum=707 WHERE name='BBC 6 Music';
UPDATE channel SET channum=708 WHERE name='BBC 7';
UPDATE channel SET channum=709 WHERE name='BBC Asian Net.';
UPDATE channel SET channum=710 WHERE name='BBC World Sv.';
UPDATE channel SET channum=711 WHERE name='The Hits Radio';
UPDATE channel SET channum=712 WHERE name='Smash Hits\!';
UPDATE channel SET channum=713 WHERE name='Kiss';
UPDATE channel SET channum=714 WHERE name='heat';
UPDATE channel SET channum=715 WHERE name='Magic';
UPDATE channel SET channum=716 WHERE name='Q';
UPDATE channel SET channum=718 WHERE name='SMOOTH RADIO';
UPDATE channel SET channum=721 WHERE name='MOJO';
UPDATE channel SET channum=722 WHERE name='Kerrang\!';
UPDATE channel SET channum=723 WHERE name='talkSPORT';
UPDATE channel SET channum=724 WHERE name='Clyde 1';
UPDATE channel SET channum=725 WHERE name='Premier Radio';
UPDATE channel SET channum=727 WHERE name='Virgin Radio';
UPDATE channel SET channum=728 WHERE name='Heart';
To use it cut and paste the SQL into a text file called channel_num_fix.sql. Then run as root:
/etc/init.d/mythbackend stop
mysql -u mythtv -p < channel_num_fix.sql
/etc/init.d/mythbackend start
2 Potential warnings here: Firstly I get you to stop the backend. I am uncertain that is necessary, however on your own head be it. Also if you have channels not listed I would ensure they are not assigned to a channel number that one of the above channel's want. I don't know what would happen, perhaps nothing bad as each channel has a unique ID as well as its number.
thanks for this. one question, from a complete newbie, ... where do I paste the channel_num_fix.sql file into???
ReplyDelete