<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>The UK freeview channels did a retune/renumber yesterday 4th September, this can be a PITA as it can require a lot of manual messing around to get the channels resorted the way you way (and remove the &#39;garbage&#39; channels from the visible lists).<br>
<br></div>The following script should allow you to quickly setup the channels in a usable format again.<br><br></div>BEFORE using the script note the following:-<br><br></div><div>BACKUP your DATABASE, BACKUP your DATABASE, BACKUP your DATABASE before doing anything else.<br>
</div><div><br></div>It&#39;s primarily for Crystal Palace transmitter, but can be modified for other UK transmitters.<br><br></div>It&#39;s NOT designed for satellite or mixed freeview/satellite setups.<br><br></div><div>
It is designed to be used after you&#39;ve done a manual retune of your channels in mythtv-setup, my personal recommendation is to delete all the existing channels before doing the retune to &#39;clear out&#39; potential conflicts.<br>
</div><div><br></div>It assumes that your Freeview Tuner device is configured so that your channel ids (chanid) will usually begin 1xxx (where xxx is the channel number, i.e. BBC One is 1001 and BBC One HD is 1101), if your device starts 2xxx or Yxxx for some reason (can sometimes happen if devices are added in different order) then you&#39;ll need to edit the script.<br>
<br></div>The channel order is just my personal preference and groups the channels the way I like, your preference may be different.<br><br></div>All errors and omissions are mine so USE AT YOUR OWN RISK....if it breaks your box or burns your house down I&#39;m not responsible.....it&#39;s purely here to save people having to do some work going through the new channels.<br>
<br></div>MAKE SURE you change the USERNAME and PASSWORD in BOTH places in the script to match your setup (once at the top and again near the bottom)<br><br></div>This script is based on ones I think I found in the wiki years ago, all credit to anyone who wants it.<br>
<br></div><div>SCRIPT STARTS BELOW<br></div><div><div><div><div><div><br> *******************************************************<br><br>#!/bin/sh<br><br><br>echo &#39;<br><br>update channel set visible=0;<br><br><br>&#39; | mysql  --database=mythconverg --user=mythtvusername --password=mythtvpassword<br>
<br><br>echo &#39;<br><br>update channel set channum=1,visible=1,commmethod=-2 where chanid=&quot;1001&quot;;<br>update channel set name=&quot;BBC One&quot; where chanid=&quot;1001&quot;;<br>update channel set callsign=&quot;BBC One&quot; where chanid=&quot;1001&quot;;<br>
update channel set channum=2,visible=1,commmethod=-2 where name=&quot;BBC TWO&quot;;<br>update channel set channum=3,visible=1 where name=&quot;ITV&quot;;<br>update channel set channum=4,visible=1 where name=&quot;Channel 4&quot;;<br>
update channel set channum=5,visible=1 where name=&quot;Channel 5&quot;;<br>update channel set channum=6,visible=1,commmethod=-2 where name=&quot;BBC THREE&quot;;<br>update channel set channum=7,visible=1,commmethod=-2 where name=&quot;BBC FOUR&quot;;<br>
update channel set channum=8,visible=1 where name=&quot;ITV2&quot;;<br>update channel set channum=9,visible=1 where name=&quot;ITV3&quot;;<br>update channel set channum=10,visible=1 where name=&quot;ITV4&quot;;<br>update channel set channum=11,visible=1 where name=&quot;E4&quot;;<br>
update channel set channum=12,visible=1 where name=&quot;More 4&quot;;<br>update channel set channum=13,visible=1 where name=&quot;Film4&quot;;<br>update channel set channum=14,visible=1 where name=&quot;Film4+1&quot;;<br>
update channel set channum=15,visible=1 where name=&quot;Movie Mix&quot;;<br>update channel set channum=16,visible=1 where name=&quot;movies4men&quot;;<br>update channel set channum=17,visible=1 where name=&quot;5*&quot;;<br>
update channel set channum=18,visible=1 where name=&quot;5 USA&quot;;<br>update channel set channum=19,visible=1 where name=&quot;Pick&quot;;<br>update channel set channum=20,visible=1 where name=&quot;Yesterday&quot;;<br>
update channel set channum=21,visible=1 where name=&quot;Dave&quot;;<br>update channel set channum=22,visible=1 where name=&quot;Really&quot;;<br>update channel set channum=23,visible=1 where name=&quot;Challenge&quot;;<br>
update channel set channum=24,visible=1 where name=&quot;True Entertainment&quot;;<br>update channel set channum=25,visible=1 where name=&quot;Drama&quot;;<br>update channel set channum=26,visible=1 where name=&quot;ITVBe&quot;;<br>
update channel set channum=27,visible=1 where name=&quot;QUEST&quot;;<br>update channel set channum=28,visible=1 where name=&quot;CBS Reality&quot;;<br>update channel set channum=29,visible=1 where name=&quot;CBS Action&quot;;<br>
update channel set channum=30,visible=1 where name=&quot;truTV&quot;;<br>update channel set channum=31,visible=1 where name=&quot;ITV +1&quot;;<br>update channel set channum=32,visible=1 where name=&quot;ITV2 +1&quot;;<br>
update channel set channum=33,visible=1 where name=&quot;ITV3+1&quot;;<br>update channel set channum=34,visible=1 where name=&quot;ITV4+1&quot;;<br>update channel set channum=35,visible=1 where name=&quot;Channel 4+1&quot;;<br>
update channel set channum=36,visible=1 where name=&quot;E4+1&quot;;<br>update channel set channum=37,visible=1 where name=&quot;4seven&quot;;<br>update channel set channum=38,visible=1 where name=&quot;Channel 5+1&quot;;<br>
update channel set channum=39,visible=1 where name=&quot;Channel 5+24&quot;;<br>update channel set channum=40,visible=1 where name=&quot;Dave ja vu&quot;;<br>update channel set channum=41,visible=1 where name=&quot;QUEST+1&quot; and chanid=&quot;1038&quot;;<br>
update channel set channum=42,visible=1 where name=&quot;truTV+1&quot;;<br>update channel set channum=45,visible=1 where name=&quot;4Music&quot;;<br>update channel set channum=46,visible=1 where name=&quot;VIVA&quot;;<br>
update channel set channum=47,visible=1 where name=&quot;Chart Show TV&quot;;<br><br>update channel set channum=50,visible=1,commmethod=-2 where name=&quot;BBC ONE HD&quot;;<br>update channel set channum=51,visible=1,commmethod=-2 where name=&quot;BBC TWO HD&quot;;<br>
update channel set channum=52,visible=1 where name=&quot;ITV HD&quot;;<br>update channel set channum=53,visible=1 where name=&quot;CHANNEL 4 HD&quot;;<br>update channel set channum=54,visible=0 where name=&quot;Channel 5 HD&quot;;<br>
update channel set channum=55,visible=1,commmethod=-2 where name=&quot;BBC THREE HD&quot;;<br>update channel set channum=56,visible=1,commmethod=-2 where name=&quot;BBC FOUR HD&quot;;<br>update channel set channum=57,visible=1 where name=&quot;Channel 4+1 HD&quot;;<br>
update channel set channum=58,visible=1 where name=&quot;4seven HD&quot;;<br><br>update channel set channum=60,visible=1 where name=&quot;BT Sport 1&quot;;<br>update channel set channum=61,visible=1 where name=&quot;BT Sport 2&quot;;<br>
<br>update channel set channum=70,visible=1,commmethod=-2 where name=&quot;CBBC&quot; and chanid=&quot;1120&quot;;<br>update channel set channum=71,visible=1,commmethod=-2 where name=&quot;CBeebies&quot; and chanid=&quot;1121&quot;;<br>
update channel set channum=72,visible=1 where name=&quot;CITV&quot; and chanid=&quot;1122&quot;;<br>update channel set channum=73,visible=1 where name=&quot;POP&quot;;<br>update channel set channum=74,visible=1 where name=&quot;POP +1&quot;;<br>
update channel set channum=75,visible=1,commmethod=-2 where name=&quot;CBBC HD&quot;and chanid=&quot;1123&quot;;<br>update channel set channum=76,visible=1,commmethod=-2 where name=&quot;CBeebies HD&quot; and chanid=&quot;1124&quot;;<br>
<br>update channel set channum=80,visible=1,commmethod=-2 where name=&quot;BBC NEWS&quot; and chanid=&quot;1130&quot;;<br>update channel set channum=81,visible=1,commmethod=-2 where name=&quot;BBC Parliament&quot; and chanid=&quot;1131&quot;;<br>
update channel set channum=82,visible=1 where name=&quot;Sky News&quot; and chanid=&quot;1132&quot;;<br>update channel set channum=84,visible=0 where name=&quot;CNN&quot;;<br>update channel set channum=85,visible=1 where name=&quot;RT&quot; and chanid=&quot;1135&quot;;<br>
update channel set channum=86,visible=1 where name=&quot;Al Jazeera Eng&quot; and chanid=&quot;1133&quot;;<br>update channel set channum=90,visible=0 where name=&quot;TV News&quot;;<br><br>update channel set channum=100,visible=1 where name=&quot;BBC NEWS HD&quot;;<br>
update channel set channum=101,visible=1 where name=&quot;Al Jazeera Eng HD&quot;;<br><br>update channel set channum=200,visible=1,commmethod=-2 where name=&quot;BBC Red Button&quot;;<br>update channel set channum=301,visible=1 where name=&quot;BBC RB 1&quot;;<br>
update channel set channum=302,visible=1 where name=&quot;302&quot;;<br>update channel set channum=700,visible=1,commmethod=-2 where name=&quot;BBC Radio 1&quot;;<br>update channel set channum=701,visible=1,commmethod=-2 where name=&quot;BBC R1X&quot;;<br>
update channel set channum=702,visible=1,commmethod=-2 where name=&quot;BBC Radio 2&quot;;<br>update channel set channum=703,visible=1,commmethod=-2 where name=&quot;BBC Radio 3&quot;;<br>update channel set channum=704,visible=1,commmethod=-2 where name=&quot;BBC Radio 4&quot;;<br>
update channel set channum=705,visible=1,commmethod=-2 where name=&quot;BBC R5L&quot;;<br>update channel set channum=706,visible=1,commmethod=-2 where name=&quot;BBC R5SX&quot;;<br>update channel set channum=707,visible=1,commmethod=-2 where name=&quot;BBC 6 Music&quot;;<br>
update channel set channum=708,visible=1,commmethod=-2 where name=&quot;BBC Radio 4 Ex&quot;;<br>update channel set channum=709,commmethod=-2 where name=&quot;BBC Asian Net.&quot;;<br>update channel set channum=710,visible=1,commmethod=-2 where name=&quot;BBC World Sv.&quot;;<br>
update channel set channum=711,visible=1 where name=&quot;BBC London&quot;;<br>update channel set channum=712,visible=1 where name=&quot;KISS FRESH&quot;;<br>update channel set channum=713,visible=1 where name=&quot;Kiss&quot;;<br>
update channel set channum=714,visible=1 where name=&quot;KISSTORY&quot;;<br>update channel set channum=715,visible=1 where name=&quot;Magic&quot;;<br>update channel set channum=716,visible=1 where name=&quot;heat&quot;;<br>
update channel set channum=717,visible=1 where name=&quot;Kerrang!&quot;;<br>update channel set channum=718,visible=1 where name=&quot;SMOOTH RADIO&quot;;<br>update channel set channum=723,visible=1 where name=&quot;talkSPORT&quot;;<br>
update channel set channum=724,visible=1 where name=&quot;Capital FM&quot;;<br>update channel set channum=725,visible=1 where name=&quot;Premier Radio&quot;;<br>update channel set channum=727,visible=1 where name=&quot;Absolute Radio&quot;;<br>
update channel set channum=728,visible=1 where name=&quot;Heart&quot;;<br><br>update channel set channum=9999773666474 where name=&quot;TBN UK&quot;;<br>update channel set channum=999947783884 where name=&quot;Al Jazeera Arabic&quot;;<br>
update channel set channum=61,visible=1 where name=&quot;BT Sport 2&quot;;<br>update channel set channum=9999999997754 where name=&quot;London Live&quot;;<br>update channel set channum=99999999916 where name=&quot;QVC&quot;;<br>
update channel set channum=99999999917 where name=&quot;G.O.L.D.&quot;;<br>update channel set channum=99999999922 where name=&quot;Ideal World&quot;;<br>update channel set channum=99999999923 where name=&quot;bid&quot;;<br>
update channel set channum=99999999926 where name=&quot;Home&quot;;<br>update channel set channum=99999999948 where name=&quot;Food Network&quot;;<br>update channel set channum=99999999949 where name=&quot;Jewellery Ch.&quot;;<br>
update channel set channum=99999758487 where name=&quot;Jewellery Maker&quot;;<br>update channel set channum=99999999950 where name=&quot;Marketplace&quot;;<br>update channel set channum=99999999955 where name=&quot;Motors TV&quot;;<br>
update channel set channum=9999999987 where name=&quot;Community&quot;;<br>update channel set channum=99998773662 where name=&quot;Community HD&quot;;<br>update channel set channum=99999747882 where name=&quot;Dating&quot;;<br>
update channel set channum=9999999302 where name=&quot;TVPlayer&quot;;<br>update channel set channum=9999999308 where name=&quot;Vintage TV&quot;;<br>update channel set channum=9999999309 where name=&quot;TOPUP Anytime3&quot;;<br>
update channel set channum=9999999306 where name=&quot;TOPUP Anytime5&quot;;<br>update channel set channum=9999999307 where name=&quot;TOPUP Anytime6&quot;;<br>update channel set channum=9999999228 where name=&quot;Christian&quot;;<br>
update channel set channum=9999999229 where name=&quot;Propeller TV&quot;;<br>update channel set channum=9999999229 where name=&quot;Connect 2&quot;;<br>update channel set channum=9999999230 where name=&quot;Connect 1&quot;;<br>
update channel set channum=9999999231 where name=&quot;Racing UK&quot;;<br>update channel set channum=9999999234 where name=&quot;CONNECT 4&quot;;<br>update channel set channum=9999999237 where name=&quot;Peace TV&quot;;<br>
update channel set channum=9999999238 where name=&quot;VuTV&quot;;<br>update channel set channum=9999999239 where name=&quot;Sonlife&quot;;<br>update channel set channum=9999999225 where name=&quot;VISION&quot;;<br>update channel set channum=9999999226 where name=&quot;CCTV&quot;;<br>
update channel set channum=9999999227 where name=&quot;Sports&quot;;<br>update channel set channum=9999999236 where name=&quot;SONY SAB&quot;;<br>update channel set channum=9999999108 where name=&quot;Sky Text&quot;;<br>update channel set channum=9999999109 where name=&quot;MOBILIZER&quot;;<br>
update channel set channum=9999991199,name=&quot;AlsoAdult&quot; where chanid=&quot;1199&quot;;<br>update channel set channum=9999999170 where name=&quot;ADULT Section&quot;;<br>update channel set channum=9999999180 where name=&quot;xxXpanded TV&quot;;<br>
update channel set channum=9999999790 where name=&quot;Test&quot;;<br>update channel set channum=9999999191 where name=&quot;ADULT redhotTV&quot;;<br>update channel set channum=9999999192 where name=&quot;ADULT Filth&quot;;<br>
update channel set channum=9999999170 where name=&quot;ADULT Section&quot;;<br>update channel set channum=9999999171 where name=&quot;Television X&quot;;<br>update channel set channum=9999999172 where name=&quot;ADULT smileTV2&quot;;<br>
update channel set channum=9999999173 where name=&quot;ADULT smileTV3&quot;;<br>update channel set channum=9999999174 where name=&quot;ADULT Babestn&quot;;<br>update channel set channum=9999999177 where name=&quot;ADULT Babestn2&quot;;<br>
update channel set channum=9999999175 where name=&quot;ADULT PARTY&quot;;<br>update channel set channum=9999999176 where name=&quot;ADULT Blue&quot;;<br>update channel set channum=9999999181 where name=&quot;ADULT Playboy TV Chat&quot;;<br>
update channel set channum=9999999201 where name=&quot;Holidays TV&quot;;<br>update channel set channum=9999999202 where name=&quot;Rabbit&quot;;<br>update channel set channum=9999999203 where name=&quot;Gay Rabbit&quot;;<br>
update channel set channum=9999999204 where name=&quot;1-2-1 Dating&quot;;<br>update channel set channum=9999999207 where name=&quot;Kiss Me TV&quot;;<br>update channel set channum=9999999208 where name=&quot;Proud Dating&quot;;<br>
update channel set channum=99999999936 where name=&quot;Create &amp; Craft&quot;;<br>update channel set channum=99999999937 where name=&quot;price-drop&quot;;<br>update channel set channum=99999999932 where name=&quot;Big Deal&quot;;<br>
update channel set channum=99999999939 where name=&quot;The Store&quot;;<br>update channel set channum=99999999942 where name=&quot;Travel Channel&quot;;<br>update channel set channum=99999999940 where name=&quot;Rocks &amp; Co 1&quot;;<br>
update channel set channum=99999999943 where name=&quot;Gems TV&quot;;<br>update channel set channum=99999999948 where name=&quot;QVC Beauty&quot;;<br>update channel set channum=99999664554 where name=&quot;QVC EXTRA&quot;;<br>
&#39; | mysql  --database=mythconverg --user=mythusername --password=mythpassword<br> <br># -- Mark BBC channels as addfree and not requiring commercial flagging.<br># UPDATE channel SET commmethod=-2 WHERE name LIKE &#39;%BBC%&#39; OR name = &#39;CBeebies&#39;;<br>
<br># -- Set Default Channel to a valid entry<br># UPDATE settings SET data=(SELECT channum FROM channel WHERE channum &gt; 100 ORDER BY channum ASC LIMIT # 1) WHERE value=&#39;DefaultTVChannel&#39;;<br><br># -- Set Smart Channel Changing (instant change on 3rd Digit)<br>
# UPDATE settings SET data = 1 WHERE value=&#39;SmartChannelChange&#39;;<br><br>***********************************************************************************************<br><br></div><div>SCRIPT ENDS ABOVE<br></div>
</div></div></div></div></div>