UK Channel Assignments

From MythTV Official Wiki
Jump to: navigation, search

Notes

It is often preferred by the installer of MythTV to re-arrange the channels numbering, based on what was assigned during the scanning process. As channel scans have to occur regularly to compensate for channel movements and reallocations a script to automate this is preferred.

What follows are three different scripts: a Freeview script which allocates channels to the standard Freeview channel assignments, a FreeSat script that assigns Freesat channels to standard freesat channel number assignments and a combined script (which could be used by freeview or freesat systems as well as combined systems) which allocates numbers in a sky-style manner to three digit channel numbers and into groups by channel genre.

Read all three; some of them have notes to explain why and how they work. The combined Freeview/FreeSat script seems to be more complete and even adds in the xmltv information if you are using xml radio times programme guide feed [[1]].

This is a much faster process than manual reassignment. If everyone contributes their changes back here; where channels have changed this will be a much simpler process for everyone. Each time you rescan for channels you will need to re-run the script - check back here hopefully it has been updated for any recent change and please be aware that when channels move around this script may need changing to prevent two channels wanting the same channel number.

Remember to change the script for your ITV1 regional variation.

The following SQL statements maybe of use: This will hide all channels where there isnt any guide data available.

UPDATE channel SET visible=0 WHERE channel.chanid NOT IN (SELECT DISTINCT(chanid) FROM program);

And; mark no comm-flagging on BBC channels

UPDATE channel set commmethod=-2 WHERE name LIKE '%BBC%' OR name = 'CBeebies';  

A full listing of channels and channel numbers for freeview by region is available from the following official website: http://www.dtg.org.uk/industry/dtt_channels.html

For FreeSat, the most up-to-date list is available at unofficial website http://www.joinfreesat.co.uk/freesat-channels/ Check "Update Scan" posts for regular new/changed/removed channel announcements

See also Database_editing_script where a template script is provided for other territories.

Having read this Wiki page I found "in my experience" there were some short falls to the install process,.. namely I was getting lots of failed recordings,. ie recordings being listed with apparently B or 0bytes in size. having trawled log files and web pages I found nothing conclusive,.. But having tried other installs/Linux Builds I started to using 0.27, and concluded that the errors were tuning based,.. and that my script was being a little optimistic on channel selection.

I therefore took the scripts originated here, (my thanks to the original authors), and developed them to my own requirements with some specific tweaks to pick-out the "good channels".

My tweaks apply when assigning the FreeView Channels,.. namely because not every FreeView channel tuned is a "good one",.. unfortunately Myth does not ( as yet in 0.27 ) understand signal quality and how to reject the low quality channels as none viable channels.

So my solution to this problem is to manually identify each good FreeView channel and use the SQL script to move this in to the "good identified" channels list. usually there are some key channel frequencies to each region so finding the good channels is not so difficult,.. and like the aim of all these scripts it only has to be done once in detail,.. and tweaked over time as minor channel changes occur.

Anyway some further pointers,.. I tuned FreeSAT channels first,.. then shifted these channels up the channum by 100,000, then I tuned Freeview channels, and then started creating/tweaking my script to move the channels around as required.

A valuable tool here when actually seeing what channel numbers are being used and what their name and callsign are set to is to look at channel info via the mythweb setting interface,.. one can search this page for channels and names,.. and edit the script appropriately. If your script messes the database up, the original backup can easily be restored and run again,.. (and again). When script completes, exit SQL, and run mythfilldatabase, and then check myth web setting again to see if two channels have been correctly allocated as you expected,.. ( note not all channels are both FreeView and FreeSAT,.. yet ), and correct as required. Many settings can be changed directly within the myth web setting,.. and makes sense for simple modification, just remember to reflect these changes to your script,.. to save later duplication of work effort!!.

Freeview

(For England - Wales, Scotland and Northern Ireland may require minor modifications)

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='Channel 5';
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='Pick TV';
update channel set channum=12 where name='Yesterday';
update channel set channum=13 where name='Channel 4+1';
update channel set channum=14 where name='More 4';
update channel set channum=15 where name='Film4';
update channel set channum=16 where name='QVC';
update channel set channum=17 where name='G.O.L.D.';
update channel set channum=18 where name='4Music';
update channel set channum=19 where name='Dave';
update channel set channum=20 where name='Really';
update channel set channum=21 where name='VIVA';
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='ITV4';
update channel set channum=25 where name='Dave ja vu';
update channel set channum=26 where name='Home';
update channel set channum=27 where name='ITV2 +1';
update channel set channum=28 where name='E4';
update channel set channum=29 where name='E4+1';
update channel set channum=30 where name='5*';
update channel set channum=31 where name='5 USA';
update channel set channum=32 where name='Big Deal';
update channel set channum=33 where name='ITV1 +1';
update channel set channum=34 where name='ESPN';
update channel set channum=36 where name='Create & Craft';
update channel set channum=37 where name='price-drop tv';
update channel set channum=38 where name='QUEST';
update channel set channum=40 where name='Rocks & Co 1';
update channel set channum=41 where name='Sky Sports 1';
update channel set channum=42 where name='Sky Sports 2';
update channel set channum=43 where name='Gems TV';
update channel set channum=44 where name='Channel 5+1';
update channel set channum=45 where name='Pick TV+1';
update channel set channum=46 where name='Challenge';
update channel set channum=47 where name='Daystar';
update channel set channum=48 where name='QVC Beauty';
update channel set channum=50 where name='BBC One HD';
update channel set channum=51 where name='ITV1 HD';
update channel set channum=52 where name='Channel 4 HD';
update channel set channum=54 where name='BBC Two HD';
update channel set channum=70 where name='CBBC Channel';
update channel set channum=71 where name='CBeebies';
update channel set channum=72 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=84 where name='CNN';
update channel set channum=85 where name='Russia Today';
update channel set channum=87 where name='COMMUNITY';
update channel set channum=89 where name='Al Jazeera Eng';
update channel set channum=90 where name='TV News';
update channel set channum=92 where name='ADULT Section';
update channel set channum=93 where name='Television X';
update channel set channum=94 where name='ADULT smileTV2';
update channel set channum=95 where name='ADULT smileTV3';
update channel set channum=96 where name='ADULT Babestn';
update channel set channum=97 where name='ADULT PARTY';
update channel set channum=98 where name='ADULT Blue';
update channel set channum=101 where name='Teletext Hols';
update channel set channum=102 where name='Rabbit';
update channel set channum=103 where name='Gay Rabbit';
update channel set channum=104 where name='1-2-1 Dating';
update channel set channum=105 where name='BBC Red Button';
update channel set channum=108 where name='Sky Text';
update channel set channum=109 where name='MOBILIZER';
update channel set channum=191 where name='ADULT redhotTV';
update channel set channum=192 where name='ADULT Filth';
update channel set channum=301 where name='301';
update channel set channum=303 where name='303';
update channel set channum=306 where name='Channel Zero';
update channel set channum=307 where name='TOPUP Anytime1';
update channel set channum=308 where name='TOPUP Anytime2';
update channel set channum=309 where name='TOPUP Anytime3';
update channel set channum=700 where name='BBC Radio 1';
update channel set channum=701 where name='BBC R1X';
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 R5L';
update channel set channum=706 where name='BBC R5SX';
update channel set channum=707 where name='BBC 6 Music';
update channel set channum=708 where name='BBC Radio 4 Ex';
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=722 where name='Kerrang!';
update channel set channum=723 where name='talkSPORT';
update channel set channum=724 where name='Capital FM';
update channel set channum=725 where name='Premier Radio';
update channel set channum=727 where name='Absolute Radio';
update channel set channum=728 where name='Heart';

FreeSat

(For the South of England; other regions may require minor modifications. Also note that due to duplicate channel names, this script is not perfect. It also has a few extra channels that I remember people requesting, like Sky News and WTF)

use mythconverg;
update channel SET channum=101 WHERE name='BBC 1 South';
update channel SET channum=102 WHERE name='BBC 2 England';
update channel SET channum=103 WHERE name='ITV1 Meridian S';
update channel SET channum=104 WHERE name='Channel 4';
update channel SET channum=105 WHERE name='Channel 5';
update channel SET channum=106 WHERE name='BBC THREE';
update channel SET channum=107 WHERE name='BBC FOUR';
update channel SET channum=108 WHERE name='BBC One HD';
update channel SET channum=109 WHERE name='BBC Two HD';
update channel SET channum=110 WHERE name='BBC ALBA';
update channel SET channum=112 WHERE name='ITV1+1';
update channel SET channum=113 WHERE name='ITV2';
update channel SET channum=114 WHERE name='ITV2+1';
update channel SET channum=115 WHERE name='ITV3';
update channel SET channum=116 WHERE name='ITV3+1';
update channel SET channum=117 WHERE name='ITV4';
update channel SET channum=118 WHERE name='ITV4+1';
update channel SET channum=119 WHERE name='ITV1 HD';
update channel SET channum=120 WHERE name='S4C';
update channel SET channum=121 WHERE name='Channel 4 +1';
update channel SET channum=122 WHERE name='E4';
update channel SET channum=123 WHERE name='E4+1';
update channel SET channum=124 WHERE name='More4';
update channel SET channum=125 WHERE name='More4 +1';
update channel SET channum=126 WHERE name='Channel 4 HD';
update channel SET channum=134 WHERE name='CBS Drama';
update channel SET channum=135 WHERE name='CBS Reality';
update channel SET channum=136 WHERE name='CBS Reality+1';
update channel SET channum=137 WHERE name='CBS Action';
update channel SET channum=138 WHERE name='horror channel';
update channel SET channum=139 WHERE name='horror ch+1';
update channel SET channum=140 WHERE name='BET';
update channel SET channum=141 WHERE name='BET +1';
update channel SET channum=142 WHERE name='True Ent';
update channel SET channum=143 WHERE name='Men & Movies';
update channel SET channum=200 WHERE name='BBC NEWS';
update channel SET channum=201 WHERE name='BBC PARLMNT';
update channel SET channum=203 WHERE name='Al Jazeera Eng';
update channel SET channum=204 WHERE name='Euronews';
update channel SET channum=205 WHERE name='France 24';
update channel SET channum=206 WHERE name='Russia Today';
update channel SET channum=207 WHERE name='CNN';
update channel SET channum=208 WHERE name='Bloomberg';
update channel SET channum=209 WHERE name='NHK World HD';
update channel SET channum=210 WHERE name='CNBC';
update channel SET channum=298 WHERE name='Sky News';
update channel SET channum=299 WHERE name='NHK World TV';
update channel SET channum=300 WHERE name='Film4';
update channel SET channum=301 WHERE name='Film4 +1';
update channel SET channum=302 WHERE name='True Movies 1';
update channel SET channum=303 WHERE name='True Movies 2';
update channel SET channum=304 WHERE name='movies4men';
update channel SET channum=305 WHERE name='mov4men+1';
update channel SET channum=306 WHERE name='movies4men 2';
update channel SET channum=307 WHERE name='mov4men2 +1';
update channel SET channum=400 WHERE name='wedding tv';
update channel SET channum=402 WHERE name='Information TV';
update channel SET channum=403 WHERE name='Showcase';
update channel SET channum=405 WHERE name='Food Network';
update channel SET channum=406 WHERE name='Food Netwrk+1';
update channel SET channum=500 WHERE name='Chart Show TV';
update channel SET channum=501 WHERE name='The Vault';
update channel SET channum=502 WHERE name='Flava';
update channel SET channum=503 WHERE name='Scuzz';
update channel SET channum=504 WHERE name='B4U Music';
update channel SET channum=509 WHERE name='Zing';
update channel SET channum=514 WHERE name='Clubland TV';
update channel SET channum=515 WHERE name='Vintage TV';
update channel SET channum=516 WHERE name='NME TV';
update channel SET channum=517 WHERE name='Bliss';
update channel SET channum=599 WHERE name='WTF';
update channel SET channum=600 WHERE name='CBBC Channel';
update channel SET channum=601 WHERE name='CBeebies';
update channel SET channum=602 WHERE name='CITV';
update channel SET channum=603 WHERE name='POP';
update channel SET channum=604 WHERE name='PopGirl';
update channel SET channum=605 WHERE name='Tiny Pop';
update channel SET channum=606 WHERE name='Kix!';
update channel SET channum=650 WHERE name='OceanFinance';
update channel SET channum=651 WHERE name='Renault TV';
update channel SET channum=652 WHERE name='Psychic TV';
update channel SET channum=690 WHERE name='Inspiration';
update channel SET channum=691 WHERE name='DAYSTAR';
update channel SET channum=692 WHERE name='revelation';
update channel SET channum=693 WHERE name='Islam Channel';
update channel SET channum=694 WHERE name='GOD Channel';
update channel SET channum=700 WHERE name='BBC R1';
update channel SET channum=701 WHERE name='BBC R1X';
update channel SET channum=702 WHERE name='BBC R2';
update channel SET channum=703 WHERE name='BBC R3';
update channel SET channum=704 WHERE name='BBC R4 FM';
update channel SET channum=705 WHERE name='BBC R5L';
update channel SET channum=706 WHERE name='BBC R5SX';
update channel SET channum=707 WHERE name='BBC 6 Music';
update channel SET channum=708 WHERE name='BBC R4 Ex';
update channel SET channum=709 WHERE name='BBC Asian';
update channel SET channum=710 WHERE name='BBC R4 LW';
update channel SET channum=711 WHERE name='BBC WS';
update channel SET channum=712 WHERE name='BBC R Scot.';
update channel SET channum=713 WHERE name='BBC R n Gael';
update channel SET channum=714 WHERE name='BBC R Wales';
update channel SET channum=715 WHERE name='BBC R Cymru';
update channel SET channum=716 WHERE name='BBC R Ulster';
update channel SET channum=718 WHERE name='BBC London';
update channel SET channum=719 WHERE name='Capital FM';
update channel SET channum=720 WHERE name='Choice FM';
update channel SET channum=721 WHERE name='Classic FM';
update channel SET channum=722 WHERE name='Gold';
update channel SET channum=723 WHERE name='XFM';
update channel SET channum=724 WHERE name='Absolute';
update channel SET channum=725 WHERE name='Absolute CR';
update channel SET channum=726 WHERE name='Absolute80s';
update channel SET channum=727 WHERE name='NME';
update channel SET channum=728 WHERE name='WRN Europe';
update channel SET channum=729 WHERE name='Jazz FM';
update channel SET channum=730 WHERE name='Planet Rock';
update channel SET channum=731 WHERE name='TalkSport';
update channel SET channum=732 WHERE name='Smooth';
update channel SET channum=733 WHERE name='Heart';
update channel SET channum=750 WHERE name='RTE Radio 1';
update channel SET channum=751 WHERE name='RTE 2FM';
update channel SET channum=752 WHERE name='RTE Lyric fm';
update channel SET channum=753 WHERE name='RTE R na G';
update channel SET channum=777 WHERE name='InsightRadio';
update channel SET channum=786 WHERE name='BFBS Radio';
update channel SET channum=790 WHERE name='TWR';
update channel SET channum=800 WHERE name='QVC';
update channel SET channum=801 WHERE name='price-drop tv';
update channel SET channum=802 WHERE name='bid tv';
update channel SET channum=803 WHERE name='Pitch TV';
update channel SET channum=804 WHERE name='Pitch World';
update channel SET channum=805 WHERE name='Gems TV';
update channel SET channum=806 WHERE name='TV SHOP';
update channel SET channum=807 WHERE name='Jewelry Maker';
update channel SET channum=808 WHERE name='JML';
update channel SET channum=809 WHERE name='JML Choice';
update channel SET channum=810 WHERE name='Ideal Extra';
update channel SET channum=812 WHERE name='Ideal World';
update channel SET channum=813 WHERE name='Create & Craft';
update channel SET channum=814 WHERE name='speedauctiontv';
update channel SET channum=815 WHERE name='Jewellery Ch.';
update channel SET channum=816 WHERE name='QVC Beauty';
update channel SET channum=817 WHERE name='Rocks & Co 1';
update channel SET channum=818 WHERE name='Gems TV Extra';
update channel SET channum=870 WHERE name='Babestation';
update channel SET channum=874 WHERE name='Filth';
update channel SET channum=950 WHERE name='BBC 1 London';
update channel SET channum=951 WHERE name='BBC 1 CI';
update channel SET channum=952 WHERE name='BBC 1 E Mids';
update channel SET channum=953 WHERE name='BBC 1 East (E)';
update channel SET channum=954 WHERE name='BBC 1 East (W)';
update channel SET channum=955 WHERE name='BBC 1 N West';
update channel SET channum=956 WHERE name='BBC 1 NE & C';
update channel SET channum=957 WHERE name='BBC 1 NI';
update channel SET channum=958 WHERE name='BBC 1 Oxford';
update channel SET channum=959 WHERE name='BBC 1 S East';
update channel SET channum=960 WHERE name='BBC 1 Scotland';
update channel SET channum=961 WHERE name='BBC 1 South';
update channel SET channum=962 WHERE name='BBC 1 S West';
update channel SET channum=963 WHERE name='BBC 1 W Mids';
update channel SET channum=964 WHERE name='BBC 1 Wales';
update channel SET channum=965 WHERE name='BBC 1 West';
update channel SET channum=966 WHERE name='BBC 1 Yorks';
update channel SET channum=967 WHERE name='BBC 1 Yrks&Lin';
update channel SET channum=968 WHERE name='BBC 2 England';
update channel SET channum=969 WHERE name='BBC 2 NI';
update channel SET channum=970 WHERE name='BBC 2 Scotland';
update channel SET channum=971 WHERE name='BBC 2 Wales';
update channel SET channum=974 WHERE name='c4 l';
update channel SET channum=977 WHERE name='ITV1 London';
update channel SET channum=986 WHERE name='Teletext';
update channel SET channum=999 WHERE name='Freesat Info';


FreeSat, updated May 2013, with numbering tweaks

(updated list, set for Northern Ireland, other areas will require adjustments. Included HD & +1 channel numbering tweaks. Script designed to easily spot "missing" channels)

use mythconverg;

## First set all channels to numbers > 10000 & invisible
## un-matched channels will stay at very high channel numbers
## making it easy to troubleshoot missing channels
update channel SET channum=channum+10000, visible=FALSE WHERE channum<60000;

## These are the channels we want in our list
## comment out any you dont want to reduce EPG clutter
## For example, I set 104 to C4 HD, skip C4 SD completely & ignore 126 as C4 HD
update channel SET channum=101, visible=1 WHERE name='BBC 1 NI HD';
update channel SET channum=102, visible=1 WHERE name='BBC 2 NI';
update channel SET channum=103, visible=1 WHERE name='UTV';
update channel SET channum=104, visible=1 WHERE name='Channel 4 HD';
update channel SET channum=105, visible=1 WHERE name='Channel 5';
update channel SET channum=106, visible=1 WHERE name='BBC THREE';
update channel SET channum=107, visible=1 WHERE name='BBC FOUR';
update channel SET channum=108, visible=1 WHERE name='BBC One HD';
update channel SET channum=109, visible=1 WHERE name='BBC Two HD';
## update channel SET channum=110, visible=1 WHERE name='BBC ALBA';
update channel SET channum=112, visible=1 WHERE name='ITV +1';
update channel SET channum=113, visible=1 WHERE name='ITV2';
update channel SET channum=114, visible=1 WHERE name='ITV2+1';
update channel SET channum=115, visible=1 WHERE name='ITV3';
update channel SET channum=116, visible=1 WHERE name='ITV3+1';
update channel SET channum=117, visible=1 WHERE name='ITV4';
update channel SET channum=118, visible=1 WHERE name='ITV4+1';
update channel SET channum=119, visible=1 WHERE name='ITV HD';
## update channel SET channum=120, visible=1 WHERE name='S4C';
update channel SET channum=121, visible=1 WHERE name='Channel 4 +1';
update channel SET channum=122, visible=1 WHERE name='E4';
update channel SET channum=123, visible=1 WHERE name='E4+1';
update channel SET channum=124, visible=1 WHERE name='More4';
update channel SET channum=125, visible=1 WHERE name='More4 +1';
## update channel SET channum=126, visible=1 WHERE name='Channel 4 HD';
update channel SET channum=127, visible=1 WHERE name='4seven';
update channel SET channum=128, visible=1 WHERE name='Channel 5+1';
update channel SET channum=129, visible=1 WHERE name='5 USA';
update channel SET channum=130, visible=1 WHERE name='5 USA +1';
update channel SET channum=131, visible=1 WHERE name='5*';
update channel SET channum=132, visible=1 WHERE name='5* +1';
update channel SET channum=134, visible=1 WHERE name='CBS Drama';
update channel SET channum=135, visible=1 WHERE name='CBS Reality';
update channel SET channum=136, visible=1 WHERE name='CBS Reality+1';
update channel SET channum=137, visible=1 WHERE name='CBS Action';
update channel SET channum=138, visible=1 WHERE name='horror channel';
update channel SET channum=139, visible=1 WHERE name='horror ch+1';
update channel SET channum=140, visible=1 WHERE name='BET:BlackEntTv';
update channel SET channum=141, visible=1 WHERE name='BET +1';
update channel SET channum=142, visible=1 WHERE name='True Ent';
update channel SET channum=143, visible=1 WHERE name='More>Movies';
update channel SET channum=144, visible=1 WHERE name='Pick TV';
update channel SET channum=145, visible=1 WHERE name='Challenge';
update channel SET channum=146, visible=1 WHERE name='Viva';
update channel SET channum=147, visible=1 WHERE name='Pick TV+1';
update channel SET channum=148, visible=1 WHERE name='Challenge+1';
update channel SET channum=200, visible=1 WHERE name='BBC NEWS';
update channel SET channum=201, visible=1 WHERE name='BBC PARL\'MNT';
update channel SET channum=202, visible=1 WHERE name='Sky News';
update channel SET channum=203, visible=1 WHERE name='Al Jazeera Eng';
update channel SET channum=204, visible=1 WHERE name='Euronews';
update channel SET channum=205, visible=1 WHERE name='France 24';
update channel SET channum=206, visible=1 WHERE name='RT';
update channel SET channum=207, visible=1 WHERE name='CNN';
update channel SET channum=208, visible=1 WHERE name='Bloomberg';
update channel SET channum=209, visible=1 WHERE name='NHK World HD';
update channel SET channum=210, visible=1 WHERE name='CNBC';
update channel SET channum=211, visible=1 WHERE name='CCTV News';
update channel SET channum=300, visible=1 WHERE name='Film4';
update channel SET channum=301, visible=1 WHERE name='Film4 +1';
update channel SET channum=302, visible=1 WHERE name='True Movies 1';
update channel SET channum=303, visible=1 WHERE name='True Movies 2';
update channel SET channum=304, visible=1 WHERE name='movies4men';
update channel SET channum=305, visible=1 WHERE name='mov4men+1';
update channel SET channum=308, visible=1 WHERE name='UMP Movies';
update channel SET channum=400, visible=1 WHERE name='Showcase';
update channel SET channum=401, visible=1 WHERE name='Information TV';
update channel SET channum=402, visible=1 WHERE name='Showcase 2';
update channel SET channum=403, visible=1 WHERE name='Food Network';
update channel SET channum=404, visible=1 WHERE name='Food Netwrk+1';
update channel SET channum=405, visible=1 WHERE name='Travel Channel';
update channel SET channum=407, visible=1 WHERE name='Fashion One';
update channel SET channum=408, visible=1 WHERE name='The Active Channel';
update channel SET channum=500, visible=1 WHERE name='Chart Show TV';
update channel SET channum=501, visible=1 WHERE name='The Vault';
update channel SET channum=502, visible=1 WHERE name='Flava';
update channel SET channum=503, visible=1 WHERE name='Scuzz';
update channel SET channum=504, visible=1 WHERE name='B4U Music';
update channel SET channum=505, visible=1 WHERE name='BuzMuzik';
update channel SET channum=504, visible=1 WHERE name='Bliss';
update channel SET channum=509, visible=1 WHERE name='Zing';
update channel SET channum=510, visible=1 WHERE name='Clubland TV';
update channel SET channum=511, visible=1 WHERE name='Planet Pop';
update channel SET channum=515, visible=1 WHERE name='Vintage TV';
update channel SET channum=516, visible=1 WHERE name='Heart TV';
update channel SET channum=517, visible=1 WHERE name='Capital TV';
update channel SET channum=518, visible=1 WHERE name='Kiss';
update channel SET channum=519, visible=1 WHERE name='The Box';
update channel SET channum=520, visible=1 WHERE name='Heat';
update channel SET channum=521, visible=1 WHERE name='Smash Hits!';
update channel SET channum=523, visible=1 WHERE name='Magic';
update channel SET channum=524, visible=1 WHERE name='Kerrang!';
update channel SET channum=599, visible=1 WHERE name='WTF';
update channel SET channum=600, visible=1 WHERE name='CBBC Channel';
update channel SET channum=601, visible=1 WHERE name='CBeebies';
update channel SET channum=602, visible=1 WHERE name='CITV';
update channel SET channum=603, visible=1 WHERE name='POP';
update channel SET channum=604, visible=1 WHERE name='PopGirl';
update channel SET channum=605, visible=1 WHERE name='Tiny Pop';
update channel SET channum=606, visible=1 WHERE name='Kix!';
update channel SET channum=652, visible=1 WHERE name='Psychic TV';
update channel SET channum=660, visible=1 WHERE name='SAB TV';
update channel SET channum=690, visible=1 WHERE name='Inspiration';
update channel SET channum=691, visible=1 WHERE name='DAYSTAR';
update channel SET channum=692, visible=1 WHERE name='revelation';
update channel SET channum=693, visible=1 WHERE name='Islam Channel';
update channel SET channum=694, visible=1 WHERE name='GOD Channel';
update channel SET channum=695, visible=1 WHERE name='Sonlife';
update channel SET channum=696, visible=1 WHERE name='TBN Europe';
update channel SET channum=700, visible=1 WHERE name='BBC R1';
update channel SET channum=701, visible=1 WHERE name='BBC R1X';
update channel SET channum=702, visible=1 WHERE name='BBC R2';
update channel SET channum=703, visible=1 WHERE name='BBC R3';
update channel SET channum=704, visible=1 WHERE name='BBC R4 FM';
update channel SET channum=705, visible=1 WHERE name='BBC R5L';
update channel SET channum=706, visible=1 WHERE name='BBC R5SX';
update channel SET channum=707, visible=1 WHERE name='BBC 6 Music';
update channel SET channum=708, visible=1 WHERE name='BBC R4 Ex';
update channel SET channum=709, visible=1 WHERE name='BBC Asian';
update channel SET channum=710, visible=1 WHERE name='BBC R4 LW';
update channel SET channum=711, visible=1 WHERE name='BBC WS';
update channel SET channum=712, visible=1 WHERE name='BBC R Scot.';
update channel SET channum=713, visible=1 WHERE name='BBC R n Gael';
update channel SET channum=714, visible=1 WHERE name='BBC R Wales';
update channel SET channum=715, visible=1 WHERE name='BBC R Cymru';
update channel SET channum=716, visible=1 WHERE name='BBC R Ulster';
update channel SET channum=718, visible=1 WHERE name='BBC London';
update channel SET channum=719, visible=1 WHERE name='Capital FM';
update channel SET channum=720, visible=1 WHERE name='Choice FM';
update channel SET channum=721, visible=1 WHERE name='Classic FM';
update channel SET channum=722, visible=1 WHERE name='Gold';
update channel SET channum=723, visible=1 WHERE name='XFM';
update channel SET channum=724, visible=1 WHERE name='Absolute';
update channel SET channum=726, visible=1 WHERE name='Absolute80s';
update channel SET channum=727, visible=1 WHERE name='NME';
update channel SET channum=728, visible=1 WHERE name='WRN Europe';
update channel SET channum=729, visible=1 WHERE name='Jazz FM';
update channel SET channum=730, visible=1 WHERE name='Planet Rock';
update channel SET channum=731, visible=1 WHERE name='TalkSport';
update channel SET channum=732, visible=1 WHERE name='Smooth';
update channel SET channum=733, visible=1 WHERE name='Heart';
update channel SET channum=750, visible=1 WHERE name='RTE Radio 1';
update channel SET channum=751, visible=1 WHERE name='RTE 2FM';
update channel SET channum=752, visible=1 WHERE name='RTE Lyric fm';
update channel SET channum=753, visible=1 WHERE name='RTE R na G';
update channel SET channum=777, visible=1 WHERE name='InsightRadio';
update channel SET channum=786, visible=1 WHERE name='BFBS Radio';
update channel SET channum=790, visible=1 WHERE name='TWR';
update channel SET channum=800, visible=1 WHERE name='QVC';
update channel SET channum=801, visible=1 WHERE name='price-drop tv';
update channel SET channum=802, visible=1 WHERE name='bid tv';
update channel SET channum=803, visible=1 WHERE name='Pitch TV';
update channel SET channum=804, visible=1 WHERE name='Pitch World';
update channel SET channum=805, visible=1 WHERE name='Gems TV';
update channel SET channum=806, visible=1 WHERE name='TV SHOP';
update channel SET channum=807, visible=1 WHERE name='Jewelry Maker';
update channel SET channum=808, visible=1 WHERE name='JML Direct';
update channel SET channum=809, visible=1 WHERE name='JML Living';
update channel SET channum=810, visible=1 WHERE name='Ideal Extra';
update channel SET channum=812, visible=1 WHERE name='Ideal World';
update channel SET channum=813, visible=1 WHERE name='Create & Craft';
update channel SET channum=815, visible=1 WHERE name='Jewellery Ch.';
update channel SET channum=816, visible=1 WHERE name='QVC Beauty';
update channel SET channum=817, visible=1 WHERE name='Rocks & Co 1';
update channel SET channum=820, visible=1 WHERE name='Thane Direct';
update channel SET channum=821, visible=1 WHERE name='High Street TV';
update channel SET channum=870, visible=1 WHERE name='Babestation';
update channel SET channum=875, visible=1 WHERE name='Playboy TV Chat';
update channel SET channum=950, visible=1 WHERE name='BBC 1 London';
update channel SET channum=951, visible=1 WHERE name='BBC 1 CI';
update channel SET channum=952, visible=1 WHERE name='BBC 1 E Mids';
update channel SET channum=953, visible=1 WHERE name='BBC 1 East (E)';
update channel SET channum=954, visible=1 WHERE name='BBC 1 East (W)';
update channel SET channum=955, visible=1 WHERE name='BBC 1 N West';
update channel SET channum=956, visible=1 WHERE name='BBC 1 NE & C';
## update channel SET channum=957, visible=1 WHERE name='BBC 1 NI';
update channel SET channum=958, visible=1 WHERE name='BBC 1 Oxford';
update channel SET channum=959, visible=1 WHERE name='BBC 1 S East';
update channel SET channum=960, visible=1 WHERE name='BBC 1 Scotland';
update channel SET channum=961, visible=1 WHERE name='BBC 1 South';
update channel SET channum=962, visible=1 WHERE name='BBC 1 S West';
update channel SET channum=963, visible=1 WHERE name='BBC 1 W Mids';
update channel SET channum=964, visible=1 WHERE name='BBC 1 Wales';
update channel SET channum=965, visible=1 WHERE name='BBC 1 West';
update channel SET channum=966, visible=1 WHERE name='BBC 1 Yorks';
update channel SET channum=967, visible=1 WHERE name='BBC 1 Yrks&Lin';
update channel SET channum=968, visible=1 WHERE name='BBC 2 England';
## update channel SET channum=969, visible=1 WHERE name='BBC 2 NI';
update channel SET channum=970, visible=1 WHERE name='BBC 2 Scotland';
update channel SET channum=971, visible=1 WHERE name='BBC 2 Wales';
update channel SET channum=974, visible=1 WHERE name='c4 l';
update channel SET channum=977, visible=1 WHERE name='ITV1 London';
update channel SET channum=986, visible=1 WHERE name='Teletext';
update channel SET channum=999, visible=1 WHERE name='Freesat Info';

## OPTIONAL: To clean up my listings,I prefer to move +1 channels out of the way
## I only use to catch the start of "already started" programs
## So I re-number to original channel + 1000
## e.g. missed start of a movie on film4(300), hit 1300 to catch on +1
## If you don't ike his idea, add hashes to the start of these lines, or just delete them.
update channel SET channum=1103, visible=1 WHERE name='ITV +1';
update channel SET channum=1113, visible=1 WHERE name='ITV2+1';
update channel SET channum=1115, visible=1 WHERE name='ITV3+1';
update channel SET channum=1117, visible=1 WHERE name='ITV4+1';
update channel SET channum=1104, visible=1 WHERE name='Channel 4 +1';
update channel SET channum=1122, visible=1 WHERE name='E4+1';
update channel SET channum=1124, visible=1 WHERE name='More4 +1';
update channel SET channum=1105, visible=1 WHERE name='Channel 5+1';
update channel SET channum=1129, visible=1 WHERE name='5 USA +1';
update channel SET channum=1131, visible=1 WHERE name='5* +1';
update channel SET channum=1135, visible=1 WHERE name='CBS Reality+1';
update channel SET channum=1138, visible=1 WHERE name='horror ch+1';
update channel SET channum=1140, visible=1 WHERE name='BET +1';
update channel SET channum=1144, visible=1 WHERE name='Pick TV+1';
update channel SET channum=1145, visible=1 WHERE name='Challenge+1';
update channel SET channum=1300, visible=1 WHERE name='Film4 +1';
update channel SET channum=1304, visible=1 WHERE name='mov4men+1';
update channel SET channum=1403, visible=1 WHERE name='Food Netwrk+1';


Combined FreeView and FreeSat HD channel assignment

An Alternative Script:-

use mythconverg;

## First set all channels to numbers > 50,000 & invisible
## un-matched channels will stay at very high channel numbers
## making it easy to troubleshoot missing channels

 -- Run these two lines  once FreeSAT has been scanned and saved, so that FreeSAT channels
 -- are moved out of the way of the FeeView channels to be scanned
 -- as it saves a lot of time with duplicate channels number assignment with Mythtv
 -- mysql -u root -p   	# To get into Database
 -- update channel SET channum=channum+100000, visible=FALSE WHERE channum<60000;

 -- update channel SET channum=channum+50000, visible=FALSE WHERE channum<60000;
 -- This assumes a two stage channel tunning,.. 
 -- 1st tune satellite channels then shift them up by 100,000
 -- Then Tune FreeView,.. and shift up by only 50,000 ie the one less than 100,000
 -- This ensures no over lap and no over-write of previously moved channels assignments
 -- This does require a pre check before shifting to ensure number will fit when shifted


 -- By choosing 49K as the criteria,.. it can be run multiple times without double shifting
 -- Comment out the following two lines if running the script multiple times in the same sessions
 -- due to script debugging errors.

update channel SET channum=channum+50000 WHERE channum<49000; 

update channel SET visible=FALSE WHERE channum>6000;

-- Clear out the pish
# delete from channel where callsign like '%MMS%';
# delete from channel where callsign like '%Test%';
# delete from channel where callsign like '%Cust%';
# delete from channel where callsign like '%Sky%';
# delete from channel where callsign REGEXP '^[0-9]';
# delete from channel where callsign like '%background%';


 -- Script to update channel numbers in a combined Freeview & Freesat system in
 -- the UK Oxford transmitter area
 -- Enhanced FreeView FreeSAT tuning developed By Mark Hamblin against the current release of the time
 -- of 0.27
 -- The original script is based on and inspired by the work of Richard Lainchbury and Stephen Robertson 
 -- posted on the mythtv-users mailing list: users@mythtv.org
 -- for access to the mailing list see http://www.mythtv.org/support
 -- use this script carefully; have multiple same channels from different sources
 -- on the same channel number is how MythTV is supposed to be configured based on 
 -- a number of posts from developers, but this should be carefully tested.
 
 -- Ensure you complete a backup of your channel database table before using
 -- script 
 -- /usr/share/mythtv/mythconverg_backup.pl
 -- to backup the entire myth database
 -- Its worth saving this file somewhere special, as it can be used later to restore
 -- the unchanged database if required.
 
 -- Why would you do this:
 -- channels which have the same name and callsign are treated as being EXACTLY
 -- the same channel by mythtv. To get them to only appear once, we set them as
 -- having the same channum as well.
 
 -- for instance Freeview ITV in in fact the regional variation of ITV for the
 -- broadcast area; such as Meridian south. On Freesat ITV1 Meridian South is 
 -- broadcast alongside ITV1 Grenada and all the other variations. In order for
 -- mythtv to know what channels are equal, we disregard all the other regional
 -- variations and set Meridian south as having the same name as the freeview
 -- channel ITV1. This has two drawbacks; 1. reduces the opportunity for Mythtv
 -- to use multi-record if an alternative regional variation is on a multiplexes
 -- that would permit a second channel to be recorded. 2. There maybe a 
 -- programme broadcast on a regional variation that you would have been 
 -- interested in. The benefit is a much easier to manage EPG.
 
 -- WARNING: If you are using broadcast EPG information (EIT) then the channels
 -- that are paired; e.g. Five on satellite and Five on terrestrial are both on
 -- channel number 5; the EPG information must be identical. If you have issues
 -- with 'NO DATA' assign each individual channel instance in the MythWeb
 -- channel editor to a separate number to identify which instance is creating
 -- an issue.
 
 -- How does this script do it
 -- move all the channels to numbers well outside the normal range (+100000) to
 -- their current number and set them as hidden; we will then go through and
 -- assign sensible numbers to those channels we would like to see in the EPG 
 -- and at the same time mark those channels visible.
 
 -- After moving all the channels out of the way there are only three different 
 -- statements in this script; 
 -- 1. Correct the naming of channels
 -- 2. For all the channels of the same name assign the same channel number 
 -- 3. the last statement in this script sets all the BBC channels as not 
 --    requiring commercial flagging as they don't carry adverts.
 
 -- Entertainment;
 -- see regions for BBC1, BBC2, ITV1, ITV1 +1, ITV1 HD
 
 -- Use the following web URL to find XMLTV ids
 -- http://supplement.xmltv.org/tv_grab_uk_rt/channel_ids

 -- Use the following to check out FreeSAT transmissions and other data
 -- http://en.kingofsat.net/freqs.php?&pos=28.2E&standard=All&ordre=freq&filtre=no

 -- sourceid='1'; assumes SATalite tuned first,.. ie first video source,..
 -- sourceid='2'; will then be the FreeView Channels found
 
 -- template
# UPDATE channel SET name='XY', channum=xx, visible=1, callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
# UPDATE channel SET name='XY', channum=xx, callsign='XY' WHERE name='XY' and sourceid='1'; -- FS XY 
 -- 
 -- BBC One, 101
 UPDATE channel SET name='BBC One', channum=101, visible=1, xmltvid="oxford.south.bbc1.bbc.co.uk", callsign='BBC One' WHERE name='BBC ONE Oxf' and freqid='53'; -- FV100%  BBC 1 oxf  
 UPDATE channel SET name='BBC One', channum=101, visible=1, xmltvid="oxford.south.bbc1.bbc.co.uk", callsign='BBC One' WHERE name='BBC One Oxford' and sourceid='1'; -- FS BBC One 
 --
 -- BBC Two, 102
 UPDATE channel SET name='BBC Two', visible=1, channum=102, callsign='BBC Two', xmltvid="bbc2.bbc.co.uk" WHERE name='BBC 2 England' and sourceid='1'; -- FS BBC Two 
 UPDATE channel SET name='BBC Two', visible=1, channum=102, callsign='BBC Two', xmltvid="bbc2.bbc.co.uk"  WHERE name='BBC Two' and freqid='53'; -- FV BBC 2 
 --
 -- ITV1, 103
 UPDATE channel SET name='ITV', channum=103, visible=1, xmltvid="meridian.itv1.itv.co.uk", callsign='ITV' WHERE name='ITV' and freqid='60'; -- FV ITV 
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="meridian.itv1.itv.co.uk", channel.channum=103, channel.name='ITV Meridian South', channel.callsign='ITV Meridian South' WHERE channel.serviceid=10140 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
# UPDATE channel, dtv_multiplex SET visible=1, xmltvid="meridian.itv1.itv.co.uk", channel.visible=1, channel.channum=103, channel.name='ITV Meridian North', channel.callsign='ITV' WHERE channel.serviceid=12101 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10993750 and dtv_multiplex.fec='5/6';
 --
 -- Channel 4
 UPDATE channel SET name='Channel 4', channum=104, visible=1, callsign='Channel 4', xmltvid="channel4.com" WHERE name='Channel 4' and freqid='60'; -- FV Channel 4 
 UPDATE channel SET name='Channel 4', channum=104, visible=1, callsign='Channel 4', xmltvid="channel4.com" WHERE name='Channel 4' and serviceid='9212'; -- FS Channel 4 Ch4 South East
 --
 -- Channel 5
 UPDATE channel SET channum=105, name='Channel 5', visible=1, xmltvid="channel5.co.uk", callsign='Channel 5' WHERE name='Channel 5' and freqid='60'; -- FV Channel 5  
 UPDATE channel SET channum=105, name='Channel 5', visible=1, xmltvid="channel5.co.uk", callsign='Channel 5' WHERE name='Channel 5' and serviceid='7700'; -- FS Channel 5 Region 1
 --
 -- BBC THREE
 UPDATE channel SET channum=106, visible=1, xmltvid="bbcthree.bbc.co.uk", name='BBC Three', callsign='BBC Three' WHERE name='BBC THREE'and freqid='53'; -- FV BBC THREE 
 UPDATE channel SET channum=106, visible=1, xmltvid="bbcthree.bbc.co.uk", name='BBC Three', callsign='BBC Three' WHERE name='BBC THREE' and sourceid='1'; -- FS BBC THREE 
 --
 -- BBC FOUR
 UPDATE channel SET channum=107, visible=1, xmltvid="bbcfour.bbc.co.uk", name='BBC Four', callsign='BBC Four' WHERE name='BBC FOUR'and freqid='53'; -- FV BBC Four 
 UPDATE channel SET channum=107, visible=1, xmltvid="bbcfour.bbc.co.uk", name='BBC FOUR', callsign='BBC Four' WHERE name='BBC FOUR' and sourceid='1'; -- FS BBC FOUR 
 -- 
 -- BBC One HD, 108
 UPDATE channel SET name='BBC one HD', channum=108, visible=1, xmltvid="hd.bbc1.bbc.co.uk", callsign='BBC one HD' WHERE name='BBC ONE HD' and freqid='57'; -- FV100% BBC one HD 
 UPDATE channel SET name='BBC one HD', channum=108, visible=1, xmltvid="hd.bbc1.bbc.co.uk", callsign='BBC one HD' WHERE name='BBC one HD' and sourceid='1'; -- FS BBC one HD 
 --
 -- BBC Two HD 109
 UPDATE channel SET channum=109, visible=1, xmltvid="hd.bbc2.bbc.co.uk", name='BBC Two HD', callsign='BBC Two HD' WHERE name='BBC TWO HD' and freqid='57'; -- FV100% BBC Two HD 
 UPDATE channel SET channum=109, visible=1, xmltvid="hd.bbc2.bbc.co.uk", name='BBC Two HD', callsign='BBC Two HD' WHERE name='BBC TWO HD' and sourceid='1'; -- FS BBC Two HD 
 --
 -- No Alba entry on FreeView
 UPDATE channel SET channum=110, visible=1, xmltvid="alba.bbc.co.uk" WHERE name='BBC Alba'; -- FS BBC Alba 
 --
 -- Dave
 UPDATE channel SET name='Dave',channum=111, visible=1, xmltvid="dave.uktv.co.uk", callsign='Dave' WHERE name='Dave' and freqid='59'; -- FV DAVE  
 -- No FreeSAT Entry UPDATE channel SET name='', callsign='' WHERE name='' and sourceid='1'; -- FS dave 
 --
 -- ITV2   113
 UPDATE channel SET channum=113, visible=1, xmltvid="itv2.itv.co.uk", name='ITV2', callsign='ITV2' WHERE name='ITV2' and freqid='60' ; -- FV ITV2 
 UPDATE channel SET name='ITV2', visible=1, xmltvid="itv2.itv.co.uk", channum=113,callsign='ITV2' WHERE name='ITV2' and sourceid='1'; -- FS ITV2 
 --
 -- ITV2+1
 UPDATE channel SET name='ITV2 +1', visible=1, channum=114, xmltvid="tsod.plus-1.itv2.itv.co.uk", callsign='ITV2+1' WHERE name='ITV2 +1' and freqid='50'; -- FV itv2 +1 
 UPDATE channel SET name='ITV2 +1', visible=1, channum=114, xmltvid="tsod.plus-1.itv2.itv.co.uk", callsign='ITV2+1' WHERE name='ITV2+1' and sourceid='1'; -- FS ITV2+1 
  --
 -- ITV3
 UPDATE channel SET name='ITV3', channum=115, visible=1, xmltvid="ITV3.itv.co.uk", callsign='ITV3' WHERE name='ITV3' and freqid='50' ; -- FV ITV3 
 UPDATE channel SET name='ITV3', channum=115, visible=1, xmltvid="ITV3.itv.co.uk", callsign='ITV3' WHERE name='ITV3' and sourceid='1'; -- FS ITV3 
 --
 -- ITV3+1
 UPDATE channel SET name='ITV3+1', channum=116, visible=1, xmltvid="tsod.plus-1.ITV3.itv.co.uk", callsign='ITV3+1' WHERE name='ITV3+1' and freqid='50'; -- FV ITV3+1 
 UPDATE channel SET name='ITV3+1', channum=116, visible=1, xmltvid="tsod.plus-1.ITV3.itv.co.uk", callsign='ITV3+1' WHERE name='ITV3+1' and sourceid='1'; -- FS ITV3+1 
 --
 -- ITV4  117
 UPDATE channel SET name='ITV4', channum=117, visible=1, xmltvid="ITV4.itv.co.uk", callsign='ITV4' WHERE name='ITV4' and freqid='47' ; -- FV ITV4 
 UPDATE channel SET name='ITV4', channum=117, visible=1, xmltvid="ITV4.itv.co.uk", callsign='ITV4' WHERE name='ITV4' and sourceid='1'; -- FS ITV4 
 --
 -- ITV4+1
 UPDATE channel SET name='ITV4+1', channum=118, visible=1, xmltvid="tsod.plus-1.ITV4.itv.co.uk", callsign='ITV4+1' WHERE name='ITV4+1' and freqid='50'; -- FV ITV4+1 
 UPDATE channel SET name='ITV4+1', channum=118, visible=1, xmltvid="tsod.plus-1.ITV4.itv.co.uk", callsign='ITV4+1' WHERE name='ITV4+1' and sourceid='1'; -- FS ITV4+1 
 --
 -- ITV1 HD, 119
 UPDATE channel SET name='ITV HD', channum=119, visible=1, xmltvid="hd.london-macro.itv1.itv.co.uk", callsign='ITV HD' WHERE name='ITV HD' and freqid='57'; -- FV ITV HD 
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="hd.london-macro.itv1.itv.co.uk", channel.channum=119, channel.name='ITV London HD', channel.callsign='ITV London HD' WHERE channel.serviceid=20780 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=11052750 and dtv_multiplex.fec='5/6';--
 --
 -- SC4 No FreeView as Not Local TV
 #UPDATE channel SET name='SC4', channum=120, visible=1, xmltvid="wales.s4c.co.uk", callsign='SC4' WHERE name='SC4' and sourceid='1'; -- FS SC4  
 --
 -- Channel 4+1
 UPDATE channel SET name='Channel4 +1', channum=121, visible=1, xmltvid="tsod.plus-1.channel4.com", callsign='Channel4 +1' WHERE name='Channel 4+1' and freqid='60'; -- FV Channel4 +1  
 UPDATE channel SET name='Channel 4 +1', channum=121, visible=1, xmltvid="tsod.plus-1.channel4.com",  callsign='Channel 4 +1' WHERE name='Channel 4 South & East +1'; -- FS Channel4 +1  Ch4 South East
 --
 -- E4
 UPDATE channel SET name='E4', channum=122, visible=1, xmltvid="e4.channel4.com", callsign='E4' WHERE name='E4' and freqid='60'; -- FV E4   
 UPDATE channel SET name='E4', channum=122, visible=1, xmltvid="e4.channel4.com", callsign='E4' WHERE name='E4' and sourceid='1'; -- FS E4 
 --
 -- E4 +1 -- 123
 UPDATE channel SET name='E4+1', channum=123, callsign='E4+1', visible=1, xmltvid="tsod.plus-1.e4.channel4.com" WHERE name='E4+1' and freqid='59'; -- FV E4+1  
 UPDATE channel SET name='E4+1', channum=123, callsign='E4+1', visible=1, xmltvid="tsod.plus-1.e4.channel4.com" WHERE name='E4+1' and sourceid='1'; -- FS E4+1 
 --
  -- More4
 UPDATE channel SET name='More4', channum=124, callsign='More 4', visible=1, xmltvid="more4.channel4.com" WHERE name='More 4' and freqid='60'; -- FV More4  
 UPDATE channel SET name='More4', channum=124, callsign='More 4', visible=1, xmltvid="more4.channel4.com" WHERE name='More4' and sourceid='1'; -- FS More4 
 --
 -- More4+1
 -- No FreeView UPDATE channel SET name='More4+1',  callsign='More4 +1' WHERE name='More4 +1' and freqid='60'; -- FV More4 +1  
 UPDATE channel SET name='More4+1', channum=125, visible=1, xmltvid="plus-1.more4.channel4.com", callsign='More4 +1' WHERE name='More4 +1' and sourceid='1'; -- FS More4 +1 
 --
 -- Channel 4 HD
 UPDATE channel SET name='Channel 4 HD', channum=126, callsign='Channel 4 HD', visible=1, xmltvid="hd.channel4.com" WHERE name='Channel 4 HD' and freqid='57'; -- FV Channel 4 HD  
 UPDATE channel SET name='Channel 4 HD', channum=126, callsign='Channel 4 HD', visible=1, xmltvid="hd.channel4.com" WHERE name='Channel 4 HD' and sourceid='1'; -- FS Channel 4 HD 
 -- 
 #UPDATE channel SET channum=127, visible=1, xmltvid="freeview.1.virginmedia.com" WHERE name='Channel One';
 #UPDATE channel SET channum=127, visible=1 WHERE name='Home';
 --
 -- Quest
 UPDATE channel SET name='Quest', channum=128, visible=1, xmltvid="freeview.quest.discoveryeurope.com", callsign='Quest' WHERE name='QUEST' and freqid='50'; -- FV Quest 
 -- No FreeSAT UPDATE channel SET name='Quest', callsign='Quest' WHERE name='Quest' and sourceid='1'; -- FS Quest 
 --
  -- Yesterday
 UPDATE channel SET name='Yesterday', channum=129, visible=1, xmltvid="freeview.yesterday.uktv.co.uk", callsign='Yesterday' WHERE name='Yesterday' and freqid='47'; -- FV Yesterday  
 UPDATE channel SET name='Yesterday', channum=129, visible=1, xmltvid="freeview.yesterday.uktv.co.uk", callsign='Yesterday' WHERE name='Yesterday' and sourceid='1'; -- FS Yesterday  
 --
 # UPDATE channel SET channum=130, visible=1, xmltvid="gold.uktv.co.uk" WHERE name='G.O.L.D.'; 
 # UPDATE channel SET name='Sky3', callsign='Sky3' WHERE name='SKY THREE';
 # UPDATE channel SET channum=131, visible=1, xmltvid="sky-three.sky.com" WHERE name='Sky3'; 
 --
 -- 5*
 UPDATE channel SET name='5*', channum=130, visible=1, xmltvid="fiver.channel5.co.uk", callsign='5*' WHERE name='5*' and freqid='50'; -- FV 5*  
 UPDATE channel SET name='5*', channum=130, visible=1, xmltvid="fiver.channel5.co.uk", callsign='5*' WHERE name='5*' and sourceid='1'; -- FS 5* 
 -- 
 -- 5 USA
 UPDATE channel SET name='5 USA', channum=131, visible=1, xmltvid="fiveusa.channel5.co.uk", callsign='5 USA' WHERE name='5 USA' and freqid='50'; -- FV 5 USA  
 UPDATE channel SET name='5 USA', channum=131, visible=1, xmltvid="fiveusa.channel5.co.uk", callsign='5 USA' WHERE name='5 USA' and sourceid='1'; -- FS 5 USA 
 --
 -- CBS Drama
 # No FreeView UPDATE channel SET name='CBS Drama', callsign='CBS Drama' WHERE name='CBS Drama' and freqid='60'; -- FV CBS Drama  
 UPDATE channel SET name='CBS Drama', channum=132, visible=1, xmltvid="drama.cbs.com", callsign='CBS Drama' WHERE name='CBS Drama' and sourceid='1'; -- FS CBS Drama 
 --
 -- CBS Reality 133
 # UPDATE channel SET name='CBS Reality', callsign='CBS Reality' WHERE name='CBS Reality' and freqid='60'; -- FV CBS Reality  
 UPDATE channel SET name='CBS Reality', channum=133, visible=1, xmltvid="reality.cbs.com", callsign='CBS Reality' WHERE name='CBS Reality' and sourceid='1'; -- FS CBS Reality 
 --
 -- CBS Reality +1
 # UPDATE channel SET name='CBS Reality +1', callsign='CBS Reality+1' WHERE name='CBS Reality +1' and freqid='60'; -- FV CBS Reality +1  
 UPDATE channel SET name='CBS Reality+1', channum=134, visible=1, xmltvid="tsod.plus-1.reality.cbs.com", callsign='CBS Reality+1' WHERE name='CBS Reality+1' and sourceid='1'; -- FS CBS Reality +1 
 --
 -- CBS Action
 # No FreeViewUPDATE channel SET name='CBS Action', callsign='CBS Action' WHERE name='CBS Action' and freqid='60'; -- FV CBS Action  
 UPDATE channel SET name='CBS Action', channum=135, visible=1, xmltvid="action.cbs.com", callsign='CBS Action' WHERE name='CBS Action' and sourceid='1'; -- FS CBS Action 
 --
 -- horror channel
 # No freeView UPDATE channel SET name='Horror Channel', callsign='Horror Channel' WHERE name='Horror Channel' and freqid='60'; -- FV Horror Channel  
 UPDATE channel SET name='Horror Channel', channum=136, visible=1, xmltvid="horror.cbs.com", callsign='Horror Channel' WHERE name='Horror Channel' and sourceid='1'; -- FS Horror Channel 
 --
 -- horror ch+1
 # UPDATE channel SET name='Horror Ch+1', callsign='Horror Ch+1' WHERE name='Horror Ch+1' and freqid='60'; -- FV Horror Ch+1  
 UPDATE channel SET name='Horror Ch+1', channum=137, visible=1, xmltvid="tsod.plus-1.horror.cbs.com", callsign='Horror Ch+1' WHERE name='Horror Ch+1' and sourceid='1'; -- FS Horror Ch+1 
  --
 -- QUEST+1 138
 UPDATE channel SET name='QUEST+1', channum=138, visible=1, xmltvid="tsod.plus-1.quest.discoveryeurope.com", callsign='QUEST+1' WHERE name='QUEST+1' and freqid='44'; -- FV QUEST+1  
 #UPDATE channel SET name='QUEST+1', channum=138, callsign='QUEST+1' WHERE name='QUEST+1' and sourceid='1'; -- FS QUEST+1 
 --
 -- 5* +1
 #UPDATE channel SET name='5* +1', channum=139, visible=1, xmltvid="fiver.channel5.co.uk", callsign='5* +1' WHERE name='5* +1' and freqid='50'; -- FV 5* +1  
 #UPDATE channel SET name='5* +1', channum=139, callsign='5* +1' WHERE name='5* +1' and sourceid='1'; -- FS 5* +1 
 --
 -- ITV +1, 140
  UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="tsod.plus-1.meridian.itv1.itv.co.uk", channel.channum=140, channel.name='ITV+1 Meridian SE', channel.callsign='ITV+1 Meridian SE' WHERE channel.serviceid=10101 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10758500 and dtv_multiplex.fec='5/6';
 --
 -- Channel 5+1
 UPDATE channel SET name='Channel 5+1', channum=141, visible=1, xmltvid="tsod.plus-1.channel5.co.uk", callsign='Channel 5+1' WHERE name='Channel 5+1' and freqid='50'; -- FV Channel 5+1  
 UPDATE channel SET name='Channel 5+1', channum=141, visible=1, xmltvid="tsod.plus-1.channel5.co.uk", callsign='Channel 5+1' WHERE name='Channel 5+1' and sourceid='1'; -- FS Channel 5+1 
 --
 -- Channel5+24
 UPDATE channel SET name='Channel5+24', channum=142, visible=1, xmltvid="channel5.co.uk", callsign='Channel5+24' WHERE name='Channel5+24' and freqid='50'; -- FV Channel5+24  
 UPDATE channel SET name='Channel5+24', channum=142, visible=1, xmltvid="channel5.co.uk", callsign='Channel5+24' WHERE name='Channel5+24' and sourceid='1'; -- FS Channel5+24 
 --
 -- 5 USA +1
 # No freeView UPDATE channel SET name='5 USA +1', callsign='5 USA +1' WHERE name='5 USA +1' and freqid='60'; -- FV 5 USA +1  
 UPDATE channel SET name='5 USA +1', channum=143, visible=1, xmltvid="tsod.plus-1.fiveusa.channel5.co.uk", callsign='5 USA +1' WHERE name='5 USA +1' and sourceid='1'; -- FS 5 USA +1 
 --
 -- Pick  -- 144
 UPDATE channel SET name='Pick', channum=144, visible=1, xmltvid="sky-three.sky.com", callsign='Pick' WHERE name='Pick' and freqid='59'; -- FV Pick  
 # UPDATE channel SET name='Pick', callsign='Pick' WHERE name='Pick' and sourceid='1'; -- FS Pick 
 --
 -- Really
 # UPDATE channel SET name='Really', callsign='Really' WHERE name='Really' and freqid='59'; -- FV Really  
 UPDATE channel SET name='Really', channum=145, visible=1, xmltvid="really.uktv.co.uk", callsign='Really' WHERE name='Really' and sourceid='1'; -- FS Really 
 --
 -- 4seven
 UPDATE channel SET name='4seven', channum=146, visible=1, xmltvid="4seven.channel4.com", callsign='4seven' WHERE name='4seven' and freqid='60'; -- FV 4seven  
 UPDATE channel SET name='4seven', channum=146, visible=1, xmltvid="4seven.channel4.com", callsign='4seven' WHERE name='4seven' and sourceid='1'; -- FS 4seven 
 --
 -- BBC THREE HD
 UPDATE channel SET name='BBC THREE HD', channum=147, visible=1, xmltvid="hd.bbcthree.bbc.co.uk", callsign='BBC THREE HD' WHERE name='BBC THREE HD' and freqid='57'; -- FV BBC THREE HD  
 UPDATE channel SET name='BBC THREE HD', channum=147, visible=1, xmltvid="hd.bbcthree.bbc.co.uk", callsign='BBC THREE HD' WHERE name='BBC THREE HD' and sourceid='1'; -- FS BBC THREE HD 
 --
 -- BBC FOUR HD
 # UPDATE channel SET name='BBC FOUR HD', channum=148,  xmltvid="hd.bbcfour.bbc.co.uk", callsign='BBC FOUR HD' WHERE name='BBC FOUR HD' and freqid='60'; -- FV BBC FOUR HD  
 UPDATE channel SET name='BBC FOUR HD', channum=148,  xmltvid="hd.bbcfour.bbc.co.uk", visible=1, callsign='BBC FOUR HD' WHERE name='BBC FOUR HD' and sourceid='1'; -- FS BBC FOUR HD 
 --
 
 -- Challenge
 UPDATE channel SET name='Challenge', channum=149, visible=1, xmltvid="challengetv.co.uk", callsign='Challenge' WHERE name='Challenge' and freqid='59'; -- FV Challenge  
 UPDATE channel SET name='Challenge', channum=149, visible=1, xmltvid="challengetv.co.uk", callsign='Challenge' WHERE name='Challenge' and sourceid='1'; -- FS Challenge 
 --
  -- Channel 5+24
 UPDATE channel SET name='Channel 5+24', channum=150, visible=1, xmltvid="plus-24.channel5.com", callsign='Channel 5+24' WHERE name='Channel 5+24' and freqid='50'; -- FV Channel 5+24  
 UPDATE channel SET name='Channel 5+24', channum=150, visible=1, xmltvid="plus-24.channel5.com", callsign='Channel 5+24' WHERE name='Channel 5+24' and sourceid='1'; -- FS Channel 5+24 
 --
  #############################################################################################################################
 -- News and Sport
 -- BBC News
UPDATE channel SET name='BBC News', channum=200, visible=1, xmltvid="news.bbc.co.uk", callsign='BBC News' WHERE name='BBC News' and freqid='53'; -- FV BBC News ; 
UPDATE channel SET name='BBC News', channum=200, visible=1, xmltvid="news.bbc.co.uk", callsign='BBC News' WHERE name='BBC News' and sourceid='1'; -- FS BBC News 
 -- 
 -- BBC Parliament
UPDATE channel SET name='BBC Parliament', channum=201, visible=1, xmltvid="Parliament.bbc.co.uk", callsign='BBC PARL\'MNT' WHERE name='BBC Parliament' and freqid='53'; -- FV BBC Parliament ; 
UPDATE channel SET name='BBC Parliament', channum=201, visible=1, xmltvid="Parliament.bbc.co.uk", callsign='BBC PARL\'MNT' WHERE name='BBC PARL\'MNT' and sourceid='1'; -- FS BBC PARL'MNT 
 -- 
 -- Al Jazeera Eng
 UPDATE channel SET name='Al Jazeera Eng', channum=202, visible=1, xmltvid="freeview.aljazeera.net", callsign='Al Jazeera Eng' WHERE name='Al Jazeera Eng' and freqid='55'; -- FV Al Jazeera Eng  
# UPDATE channel SET name='Al Jazeera Eng', channum=202, callsign='XY' WHERE name='XY' and sourceid='1'; -- FS XY 
 -- 
 -- TBN Europe
# UPDATE channel SET name='TBN Europe', channum=203, visible=1, callsign='TBN Europe' WHERE name='TBN Europe' and freqid='60'; -- FV TBN Europe  
 UPDATE channel SET name='TBN Europe', channum=203, visible=1, callsign='TBN Europe' WHERE name='TBN Europe' and sourceid='1'; -- FS TBN Europe 
 -- 
 -- RT HD
# UPDATE channel SET name='XY', channum=xx, visible=1, callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='RT HD', visible=1, channum=204, callsign='RT HD' WHERE name='RT HD' and sourceid='1'; -- FS RT HD 
 -- 
 -- Bloomberg
# UPDATE channel SET name='XY', channum=xx, visible=1, callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
  UPDATE channel SET name='Bloomberg', visible=1, channum=205, xmltvid="bloomberg.com", callsign='Bloomberg' WHERE name='Bloomberg' and sourceid='1'; -- FS Bloomberg 
 -- 
 -- NHK World HD
# UPDATE channel SET name='XY', channum=xx, visible=1, callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='NHK World HD', visible=1, channum=206, callsign='NHK World HD' WHERE name='NHK World HD' and sourceid='1'; -- FS NHK World HD 
 -- 
 -- Sky News
 UPDATE channel SET name='Sky News', channum=207, visible=1, callsign='Sky News', xmltvid="sky-news.sky.com" WHERE name='Sky News' and freqid='59'; -- FV Sky News  
 # UPDATE channel SET name='XY', channum=207, visible=1,  callsign='XY' WHERE name='XY' and sourceid='1'; -- FS XY 
 -- 
 -- BBC NEWS HD
# UPDATE channel SET name='XY', channum=xx, visible=1, callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='BBC NEWS HD', visible=1, channum=208, xmltvid="hd.news.bbc.co.uk", callsign='BBC NEWS HD' WHERE name='BBC NEWS HD' and sourceid='1'; -- FS BBC NEWS HD 
 -- 
 -- News 18 India
# UPDATE channel SET name='XY', channum=xx,  callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='News 18 India', visible=1, channum=209, callsign='News 18 India' WHERE name='News 18 India' and sourceid='1'; -- FS News 18 India 
 -- 
 -- LBC News
# UPDATE channel SET name='LBC News', channum=210, visible=1, WHERE name='LBC News' and freqid='53'; -- FV LBC News ; 
UPDATE channel SET name='LBC News', channum=210, callsign='LBC News' WHERE name='LBC News' and sourceid='1'; -- FS LBC News 
 -- 
 
 #UPDATE channel SET channum=202, visible=1, xmltvid="2.s4c.co.uk" WHERE name='S4C2';
 #UPDATE channel SET channum=204, visible=1, xmltvid="euronews.com" WHERE name='EuroNews';
 #UPDATE channel SET name='CNN International', xmltvid="europe.cnn.com", callsign='CNN International' WHERE name='CNN';
 #UPDATE channel SET channum=206, visible=1 WHERE name='Russia Today';
 #UPDATE channel SET channum=207, visible=1, xmltvid="freeview.europe.cnn.com" WHERE name='CNN International';
 #UPDATE channel SET channum=210, visible=1, xmltvid="europe.cnbc.com" WHERE name='CNBC';
 #UPDATE channel SET channum=213, visible=1, xmltvid="hd.Parliament.bbc.co.uk" WHERE name='BBC Parliament HD';


 #############################################################################################################################
 -- Movies;
 -- Film4
 UPDATE channel SET name='Film4', channum=300, visible=1, xmltvid="filmfour.channel4.com", callsign='Film4' WHERE name='Film4' and freqid='60'; -- FV Film4  
 UPDATE channel SET name='Film4', channum=300, visible=1, xmltvid="filmfour.channel4.com", callsign='Film4' WHERE name='Film4' and sourceid='1'; -- FS Film4 
 --
 -- Film4 +1
 UPDATE channel SET name='Film4 +1', channum=301, visible=1, xmltvid="tsod.plus-1.filmfour.channel4.com", callsign='Film4 +1' WHERE name='Film4 +1' and freqid='60'; -- FV Film4 +1  
 UPDATE channel SET name='Film4 +1', channum=301, visible=1, xmltvid="tsod.plus-1.filmfour.channel4.com", callsign='Film4 +1' WHERE name='Film4 +1' and sourceid='1'; -- FS Film4 +1 
 --
  -- True Movies 1
 # UPDATE channel SET name='XY', channum=302, visible=1, xmltvid="1.truemovies.tv"callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='True Movies 1', channum=302, visible=1, xmltvid="1.truemovies.tv", callsign='True Movies 1' WHERE name='True Movies 1' and sourceid='1'; -- FS True Movies 1 
 --
 -- True Movies 2
 # UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='True Movies 2', channum=303, visible=1, xmltvid="2.truemovies.tv", callsign='True Movies 2' WHERE name='True Movies 2' and sourceid='1'; -- FS True Movies 2 
  --
 -- Movie Mix
 UPDATE channel SET name='Movie Mix', channum=304, visible=1, callsign='Movie Mix' WHERE name='Movie Mix' and freqid='59'; -- FV Movie Mix  
 # UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and sourceid='1'; -- FS XY 
 --
 -- True Entertainment
 UPDATE channel SET name='True Entertainment', channum=305, visible=1, xmltvid="entertainment.truemovies.tv", callsign='True Entertainment' WHERE name='True Entertainment' and freqid='50'; -- FV True Entertainment  
 # UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and sourceid='1'; -- FS XY 
 --
 -- Showcase
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='Showcase', channum=306, visible=1, xmltvid="blank.showcase.movies.sky.com", callsign='Showcase' WHERE name='Showcase' and sourceid='1'; -- FS Showcase 
 --
 -- Showcase +1
 # UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='Showcase +1', channum=307, visible=1, xmltvid="blank.showcase.movies.sky.com", callsign='Showcase +1' WHERE name='Showcase +1' and sourceid='1'; -- FS Showcase +1 
 --
 -- Showcase 2
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='Showcase 2', visible=1, channum=308, callsign='Showcase 2' WHERE name='Showcase 2' and sourceid='1'; -- FS Showcase 2 
 --
 -- Showcase 2 +1
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='Showcase 2 +1', channum=309, visible=1, callsign='Showcase 2 +1' WHERE name='Showcase 2 +1' and sourceid='1'; -- FS Showcase 2 +1 
 --

# UPDATE channel SET channum=304, visible=1, xmltvid="1.movies4men.co.uk" WHERE name='Movies4Men';
# UPDATE channel SET channum=306, visible=1, xmltvid="2.movies4men.co.uk" WHERE name='Movies4Men 2';
# UPDATE channel SET name='Movies4Men +1', xmltvid="plus-1.1.movies4men.co.uk", callsign='Movies4Men +1' WHERE name='mov4men+1';
# UPDATE channel SET channum=307, visible=1, xmltvid="tsod.plus-1.1.movies4men.co.uk" WHERE name='Movies4Men +1';
# UPDATE channel SET name='Movies4Men 2 +1', callsign='Movies4Men 2 +1' WHERE name='mov4men2 +1';
# UPDATE channel SET channum=308, visible=1, xmltvid="tsod.plus-1.2.movies4men.co.uk" WHERE name='Movies4Men 2 +1';
# UPDATE channel SET name='Men & Movies', callsign='Men & Movies' WHERE name='men&movies';
# UPDATE channel SET channum=309, visible=1 WHERE name='Men & Movies';
# UPDATE channel SET name='Men & Movies +1', callsign='Men & Movies +1' WHERE name='men&movs+1';
# UPDATE channel SET channum=310, visible=1 WHERE name='Men & Movies +1';
# UPDATE channel SET name='Men & Movies +1', callsign='Men & Movies +1' WHERE name='men&movs+1';
# UPDATE channel SET channum=312, visible=1 WHERE name='more>movies';
# UPDATE channel SET name='more>movies +1', callsign='More Movies +1' WHERE name='m>movies+1';
# UPDATE channel SET channum=313, visible=1 WHERE name='more>movies +1';

 
 -- Lifestyle;
 #UPDATE channel SET channum=400, visible=1, xmltvid="weddingtv.com" WHERE name='Wedding TV';
 #UPDATE channel SET channum=401, visible=1 WHERE name='Wedding TV Asia';
 #UPDATE channel SET channum=402, visible=1, xmltvid="showcase.information.tv" WHERE name='Information TV';
 #UPDATE channel SET channum=403, visible=1 WHERE name='Rural TV';
 
  -- Food Network
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='Food Network', channum=400, visible=1, xmltvid="foodnetwork.com", callsign='Food Network' WHERE name='Food Network' and sourceid='1'; -- FS Food Network 
 --
  -- Food Netwrk+1
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='Food Netwrk+1', channum=401, visible=1, xmltvid="tsod.plus-1.foodnetwork.com", callsign='Food Netwrk+1' WHERE name='Food Netwrk+1' and sourceid='1'; -- FS Food Netwrk+1 
 --

 
 -- Music;
  -- Chart Show TV
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='Chart Show TV', channum=500, visible=1, xmltvid="chartshow.com", callsign='Chart Show TV' WHERE name='Chart Show TV' and sourceid='1'; -- FS Chart Show TV 
 --
  -- Chartshw Dnce
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='Chartshw Dnce', channum=501, visible=1, xmltvid="mydancenation.com", callsign='Chartshw Dnce' WHERE name='Chartshw Dnce' and sourceid='1'; -- FS Chartshw Dnce 
 --
  -- The Vault
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='The Vault', channum=502, callsign='The Vault', visible=1  WHERE name='The Vault' and sourceid='1'; -- FS The Vault 
 --
  -- Flava
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='Flava', channum=503, visible=1, xmltvid="essentialflava.com", callsign='Flava' WHERE name='Flava' and sourceid='1'; -- FS Flava 
 --
  -- VIVA
 UPDATE channel SET name='VIVA', visible=1, channum=504, xmltvid="uk.viva.tv", callsign='VIVA' WHERE name='VIVA' and freqid='55'; -- FV VIVA  
 UPDATE channel SET name='VIVA', visible=1, channum=504, xmltvid="uk.viva.tv", callsign='VIVA' WHERE name='VIVA' and sourceid='1'; -- FS VIVA 
 --
  -- B4U Music
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='B4U Music', channum=505, visible=1, xmltvid="b4utv.com", callsign='B4U Music' WHERE name='B4U Music' and sourceid='1'; -- FS B4U Music 
 --
  -- 4Music
 UPDATE channel SET name='4Music', channum=506, visible=1, callsign='4Music' WHERE name='4Music' and freqid='55'; -- FV 4Music  
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and sourceid='1'; -- FS XY 
 --
  -- Scuzz
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='Scuzz', channum=507, visible=1, xmltvid="scuzz.tv", callsign='Scuzz' WHERE name='Scuzz' and sourceid='1'; -- FS Scuzz 
 --
 -- Bliss
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='Bliss', channum=508, visible=1, xmltvid="bliss.co.uk", callsign='Bliss' WHERE name='Bliss' and sourceid='1'; -- FS Bliss 
 --
  -- Kiss Me TV
 UPDATE channel SET name='Kiss Me TV', channum=509, visible=1, xmltvid="kiss-tv.kiss100.com", callsign='Kiss Me TV' WHERE name='Kiss Me TV' and freqid='59'; -- FV Kiss Me TV  
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and sourceid='1'; -- FS XY 
 --
 

#UPDATE channel SET channum=509, visible=1 WHERE name='Zing';
#UPDATE channel SET channum=514, visible=1 WHERE name='Clubland TV';
#UPDATE channel SET channum=518, visible=1 WHERE name='DanceNationTV';
 
  #############################################################################################################################
 -- Children;
  -- CBBC Channel
 UPDATE channel SET name='CBBC Channel', channum=600, visible=1, xmltvid="cbbc.bbc.co.uk", callsign='CBBC Channel' WHERE name='CBBC Channel' and freqid='53'; -- FV CBBC  
 UPDATE channel SET name='CBBC Channel', channum=600, visible=1, xmltvid="cbbc.bbc.co.uk", callsign='CBBC Channel' WHERE name='CBBC Channel' and sourceid='1'; -- FS CBBC Channel 
 --
 -- CBeebies
 UPDATE channel SET name='CBeebies', channum=601, visible=1, xmltvid="cbeebies.bbc.co.uk", callsign='CBeebies' WHERE name='CBeebies' and freqid='53'; -- FV CBeebies  
 UPDATE channel SET name='CBeebies', channum=601, visible=1, xmltvid="cbeebies.bbc.co.uk", callsign='CBeebies' WHERE name='CBeebies' and sourceid='1'; -- FS CBeebies 
 --
 -- CITV
 UPDATE channel SET name='CITV', channum=602, visible=1, xmltvid="citv.itv.co.uk", callsign='CITV' WHERE name='CITV' and freqid='50'; -- FV CITV  
 UPDATE channel SET name='CITV', channum=602, visible=1, xmltvid="citv.itv.co.uk", callsign='CITV' WHERE name='CITV' and sourceid='1'; -- FS CITV 
 --
 -- POP
 # UPDATE channel SET name='POP', callsign='POP' WHERE name='POP' and freqid='60'; -- FV POP  
 UPDATE channel SET name='POP', channum=603, visible=1, xmltvid="popfun.co.uk", callsign='POP' WHERE name='POP' and sourceid='1'; -- FS POP 
 -- 
 -- Tiny Pop
 # UPDATE channel SET name='Tiny Pop', callsign='Tiny Pop' WHERE name='Tiny Pop' and freqid='60'; -- FV Tiny Pop  
 UPDATE channel SET name='Tiny Pop', channum=604, visible=1, xmltvid="tinypop.com", callsign='Tiny Pop' WHERE name='Tiny Pop' and sourceid='1'; -- FS Tiny Pop 
 --
 -- Tiny Pop +1
 # UPDATE channel SET name='Tiny Pop +1', callsign='Tiny Pop +1' WHERE name='Tiny Pop +1' and freqid='60'; -- FV Tiny Pop +1  
 UPDATE channel SET name='Tiny Pop +1', channum=605, visible=1, xmltvid="tsod.plus-1.tinypop.com", callsign='Tiny Pop +1' WHERE name='Tiny Pop +1' and sourceid='1'; -- FS Tiny Pop +1 
 --
 -- Kix
 # UPDATE channel SET name='Kix', callsign='Kix' WHERE name='Kix' and freqid='60'; -- FV Kix  
 UPDATE channel SET name='Kix', channum=606, visible=1, callsign='Kix' WHERE name='Kix' and sourceid='1'; -- FS Kix 
 --
  -- Kix+1
 # UPDATE channel SET name='Kix+1', callsign='Kix+1' WHERE name='Kix+1' and freqid='60'; -- FV Kix+1  
 UPDATE channel SET name='Kix+1', channum=607, visible=1, callsign='Kix+1' WHERE name='Kix+1' and sourceid='1'; -- FS Kix+1 
 --
 -- PopGirl
 UPDATE channel SET name='PopGirl', channum=608, visible=1, callsign='PopGirl' WHERE name='PopGirl' and freqid='60'; -- FV PopGirl  
 UPDATE channel SET name='PopGirl', channum=608, visible=1, callsign='PopGirl' WHERE name='PopGirl' and sourceid='1'; -- FS PopGirl 
 --
 -- PopGirl +1
 UPDATE channel SET name='PopGirl +1', channum=609, visible=1, callsign='PopGirl +1' WHERE name='PopGirl +1' and freqid='60'; -- FV PopGirl +1  
 UPDATE channel SET name='PopGirl +1', channum=609, visible=1, callsign='PopGirl +1' WHERE name='PopGirl +1' and sourceid='1'; -- FS PopGirl +1 
 --
  -- CBBC HD
 UPDATE channel SET name='CBBC HD', channum=610, visible=1, xmltvid="hd.cbbc.bbc.co.uk", callsign='CBBC HD' WHERE name='CBBC HD' and freqid='57'; -- FV CBBC HD  
 UPDATE channel SET name='CBBC HD', channum=610, visible=1, xmltvid="hd.cbbc.bbc.co.uk", callsign='CBBC HD' WHERE name='CBBC HD' and sourceid='1'; -- FS CBBC HD 
 -- 
 -- CBeebies HD
 # UPDATE channel SET name='CBeebies HD', callsign='CBeebies HD' WHERE name='CBeebies HD' and freqid='60'; -- FV CBeebies HD  
 UPDATE channel SET name='CBeebies HD', channum=611, visible=1, xmltvid="hd.cbeebies.bbc.co.uk", callsign='CBeebies HD' WHERE name='CBeebies HD' and sourceid='1'; -- FS CBeebies HD 
 --
 # UPDATE channel SET channum=609, visible=1 WHERE name='Cartoonito';
 # UPDATE channel SET name='Jazeera Children', callsign='Jazeera Children' WHERE name='JazeeraChildren';
 # UPDATE channel SET channum=610, visible=1 WHERE name='Jazeera Children';
 #
 #
 #
 # ############################################################################################################################
 #
 -- Special Interest;
  -- Inspiration
 # UPDATE channel SET name='Inspiration', callsign='Inspiration' WHERE name='Inspiration' and freqid='60'; -- FV Inspiration  
 UPDATE channel SET name='Inspiration', channum=690, visible=1, callsign='Inspiration' WHERE name='Inspiration' and sourceid='1'; -- FS Inspiration 
 --
 -- DAYSTAR
 # UPDATE channel SET name='DAYSTAR', callsign='DAYSTAR' WHERE name='DAYSTAR' and freqid='60'; -- FV DAYSTAR  
 UPDATE channel SET name='DAYSTAR', channum=691, visible=1, callsign='DAYSTAR' WHERE name='DAYSTAR' and sourceid='1'; -- FS DAYSTAR 
 --
 #
 #
 #
 #
 #############################################################################################################################
 #
 -- Radio;	##############################################################################################################
 -- Radio 1
 UPDATE channel SET name='BBC Radio 1', channum=700, visible=1, callsign='BBC Radio 1' WHERE name='BBC Radio 1' and freqid='53'; -- FV BBC Radio 1  
 UPDATE channel SET name='BBC Radio 1', channum=700, callsign='BBC R1' WHERE name='BBC R1' and sourceid='1'; -- FS BBC R1 
 --
 -- BBC R1X
 UPDATE channel SET name='BBC R1X', channum=701, visible=1, callsign='BBC R1X' WHERE name='BBC R1X' and freqid='53'; -- FV BBC R1X  
 UPDATE channel SET name='BBC R1X', channum=701, callsign='BBC R1X' WHERE name='BBC R1X' and sourceid='1'; -- FS BBC R1X 
 --
  -- BBC Radio 2
 UPDATE channel SET name='BBC Radio 2', channum=702, visible=1, callsign='BBC Radio 2' WHERE name='BBC Radio 2' and freqid='53'; -- FV BBC Radio 2  
 UPDATE channel SET name='BBC Radio 2', channum=702, callsign='BBC R2' WHERE name='BBC R2' and sourceid='1'; -- FS BBC R2 
 --
 -- BBC Radio 2
 UPDATE channel SET name='BBC Radio 2', channum=703, visible=1, callsign='BBC Radio 2' WHERE name='BBC Radio 2' and freqid='53'; -- FV BBC Radio 2  
 UPDATE channel SET name='BBC Radio 2', channum=703, callsign='BBC R2' WHERE name='BBC R2' and sourceid='1'; -- FS BBC R2 
 --
 -- BBC Radio 3
 UPDATE channel SET name='BBC Radio 3', channum=704, visible=1, callsign='BBC Radio 3' WHERE name='BBC Radio 3' and freqid='53'; -- FV BBC Radio 3  
 UPDATE channel SET name='BBC Radio 3', channum=704, callsign='BBC R3' WHERE name='BBC R3' and sourceid='1'; -- FS BBC R3 
 --
 -- BBC Radio 4
 UPDATE channel SET name='BBC Radio 4', channum=705, visible=1, callsign='BBC Radio 4' WHERE name='BBC Radio 4' and freqid='53'; -- FV BBC Radio 4  
 UPDATE channel SET name='BBC Radio 4', channum=705, callsign='BBC R4' WHERE name='BBC R4' and sourceid='1'; -- FS BBC R4 
 --
 -- BBC R4 FM
 UPDATE channel SET name='BBC R4 FM', channum=706, visible=1, callsign='BBC R4 FM' WHERE name='BBC R4 FM' and sourceid='1'; -- FS BBC R4 FM 
 --
 -- BBC R4 LW
 UPDATE channel SET name='BBC R4 LW', channum=707, visible=1, callsign='BBC R4 LW' WHERE name='BBC R4 LW' and sourceid='1'; -- FS BBC R4 LW 
 --
 -- BBC Radio 4 Ex
 UPDATE channel SET name='BBC Radio 4 Ex', channum=708, visible=1, callsign='BBC Radio 4 Ex' WHERE name='BBC Radio 4 Ex' and freqid='53'; -- FV BBC Radio 4 Ex  
 UPDATE channel SET name='BBC Radio 4 Ex', channum=708, callsign='BBC Radio 4 Ex' WHERE name='BBC R4 Ex' and sourceid='1'; -- FS BBC R4 Ex 
 --
 -- BBC R5L
 UPDATE channel SET name='BBC R5L', channum=709, visible=1, callsign='BBC R5L' WHERE name='BBC R5L' and freqid='53'; -- FV BBC R5L  
 UPDATE channel SET name='BBC R5L', channum=709, callsign='BBC R5L' WHERE name='BBC R5L' and sourceid='1'; -- FS BBC R5L 
 -- 
 -- BBC R5SX Radio 5 Sports Extra
 UPDATE channel SET name='BBC R5SX', channum=710, visible=1, callsign='BBC R5SX' WHERE name='BBC R5SX' and freqid='53'; -- FV BBC R5SX  
 # UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and sourceid='1'; -- FS XY 
 --
 -- BBC 6 Music
 UPDATE channel SET name='BBC 6 Music', channum=711, visible=1, callsign='BBC 6 Music' WHERE name='BBC 6 Music' and freqid='53'; -- FV BBC 6 Music  
 UPDATE channel SET name='BBC 6 Music', channum=711, callsign='BBC 6 Music' WHERE name='BBC 6 Music' and sourceid='1'; -- FS BBC 6 Music 
 --
 -- BBC Asian Net.
 UPDATE channel SET name='BBC Asian', channum=712, visible=1, xmltvid="blank.asianetglobal.com", callsign='BBC Asian Net.' WHERE name='BBC Asian Net.' and freqid='53'; -- FV BBC Asian Net.  
 UPDATE channel SET name='BBC Asian', channum=712, visible=1, xmltvid="blank.asianetglobal.com", callsign='BBC Asian' WHERE name='BBC Asian' and sourceid='1'; -- FS BBC Asian 
 --
 -- BBC World Sv.
 UPDATE channel SET name='BBC World Sv.', channum=713, visible=1, callsign='BBC World Sv.' WHERE name='BBC World Sv.' and freqid='53'; -- FV BBC World Sv.  
 UPDATE channel SET name='BBC World Sv.', channum=713, callsign='BBC WS' WHERE name='BBC WS' and sourceid='1'; -- FS BBC WS 
 --
 -- BBC R Scot.
 # UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='XY', channum=714, visible=1, callsign='BBC R Scot.' WHERE name='BBC R Scot.' and sourceid='1'; -- FS BBC R Scot. 
 --
 # UPDATE channel SET channum=708, visible=1 WHERE name='BBC Radio 7';
 # UPDATE channel SET name='BBC Radio 4 LW', callsign='BBC Radio 4 LW' WHERE name='BBC R4 LW';
 # UPDATE channel SET channum=710, visible=1 WHERE name='BBC Radio 4 LW';
 --
 -- BBC R Wales
 # UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='BBC R Wales', channum=715, visible=1, callsign='BBC R Wales' WHERE name='BBC R Wales' and sourceid='1'; -- FS BBC R Wales 
 --
 -- BBC  London
 # UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='BBC  London', channum=716, visible=1, callsign='BBC  London' WHERE name='BBC  London' and sourceid='1'; -- FS BBC  London 
 --
 -- BBC R Ulster
 # UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='BBC R Ulster', channum=717, visible=1, callsign='BBC R Ulster' WHERE name='BBC R Ulster' and sourceid='1'; -- FS BBC R Ulster 
 --
 -- Absolute Radio
 UPDATE channel SET name='Absolute Radio', channum=718, visible=1, callsign='Absolute Radio' WHERE name='Absolute Radio' and freqid='50'; -- FV Absolute Radio  
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and sourceid='1'; -- FS XY 
 --
 -- Absolute Radio
 UPDATE channel SET name='Absolute Radio', channum=719, visible=1, callsign='Absolute Radio' WHERE name='Absolute Radio' and freqid='50'; -- FV Absolute Radio  
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and sourceid='1'; -- FS XY 
 --
  -- Talksport
 # Causes Crash UPDATE channel SET name='talkSPORT', callsign='talkSPORT' WHERE name='talkSPORT' and freqid='59'; -- FV talkSPORT  
 UPDATE channel SET name='Talksport', channum=720, visible=1, callsign='Talksport' WHERE name='Talksport' and sourceid='1'; -- FS Talksport 
 --
 -- Magic
 # Causes Crash UPDATE channel SET name='Magic', callsign='Magic' WHERE name='Magic' and freqid='55'; -- FV Magic  
 UPDATE channel SET name='Magic', channum=721, visible=1, callsign='Magic' WHERE name='Magic' and sourceid='1'; -- FS Magic 
 --
 -- Heat
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='Heat', channum=722, visible=1, callsign='Heat' WHERE name='Heat' and sourceid='1'; -- FS Heat 
 --
 -- HeatFV Test 
 UPDATE channel SET name='HeatFV', channum=723, visible=1, callsign='Heat' WHERE name='Heat' and freqid='55'; -- FV Heat  
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and sourceid='1'; -- FS XY 

 --
  
 #UPDATE channel SET channum=734, visible=1 WHERE name='The Hits Radio';
 #UPDATE channel SET channum=735, visible=1 WHERE name='Smooth Radio';
 #UPDATE channel SET channum=736, visible=1 WHERE name='Kerrang!';
 #UPDATE channel SET channum=737, visible=1 WHERE name='heat';
 #UPDATE channel SET channum=738, visible=1 WHERE name='Kiss';
 #UPDATE channel SET channum=738, visible=1 WHERE name='Heart';
 #UPDATE channel SET channum=738, visible=1 WHERE name='Smash Hits!';
 #UPDATE channel SET channum=750, visible=1 WHERE name='RTE Radio 1';
 #UPDATE channel SET name='Insight Radio', callsign='Insight Radio' WHERE name='insightradio';
 #UPDATE channel SET channum=777, visible=1 WHERE name='Insight Radio';
 #UPDATE channel SET channum=786, visible=1 WHERE name='BFBS Radio';
 #UPDATE channel SET channum=790, visible=1 WHERE name='TWR';

 #UPDATE channel SET channum=732, visible=1 WHERE name='Q';
# UPDATE channel SET channum=720, visible=1 WHERE name='Choice FM';
# UPDATE channel SET channum=721, visible=1 WHERE name='Classic FM';
# UPDATE channel SET channum=722, visible=1 WHERE name='Gold';
# UPDATE channel SET channum=723, visible=1 WHERE name='Xfm London';
# UPDATE channel SET name='Absolute Classic Rock', callsign='Absolute Classic Rock' WHERE name='absolute CR';
# UPDATE channel SET channum=725, visible=1 WHERE name='Absolute Classic Rock';
# UPDATE channel SET name='Absolute 80s', callsign='Absolute 80s' WHERE name='absolute80s';
# UPDATE channel SET channum=726, visible=1 WHERE name='Absolute 80s';
# UPDATE channel SET name='NME Radio', callsign='NME Radio' WHERE name='NME';
# UPDATE channel SET channum=727, visible=1 WHERE name='NME Radio';
# UPDATE channel SET name='WRN Radio', callsign='WRN Radio' WHERE name='WRN europe';
# UPDATE channel SET channum=728, visible=1 WHERE name='WRN Radio';
# UPDATE channel SET channum=729, visible=1 WHERE name='Jazz FM';
# UPDATE channel SET channum=730, visible=1 WHERE name='Planet Rock';


 
 -- Shopping;
  -- QVC
 UPDATE channel SET name='QVC', channum=750, visible=1, xmltvid="qvcuk.com", callsign='QVC' WHERE name='QVC' and freqid='50'; -- FV QVC  
 # UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and sourceid='1'; -- FS XY 
 --
 -- Price Drop
 UPDATE channel SET name='Price Drop', channum=751, visible=1, xmltvid="price-drop.tv", callsign='Price Drop' WHERE name='Price Drop' and freqid='59'; -- FV Price Drop  
 UPDATE channel SET name='Price Drop', visible=1, xmltvid="price-drop.tv", callsign='Price Drop' WHERE name='Price Drop' and sourceid='1'; -- FS Price Drop 
 --
 -- bid
 UPDATE channel SET name='Bid', channum=752, visible=1, callsign='Bid' WHERE name='Bid' and freqid='60'; -- FV Bid  
 UPDATE channel SET name='Bid', channum=752, visible=1, callsign='Bid' WHERE name='Bid' and sourceid='1'; -- FS Bid 
 --
 -- Gems TV
 UPDATE channel SET name='Gems TV', channum=753, visible=1, xmltvid="gemstv.co.uk", callsign='Gems TV' WHERE name='Gems TV' and freqid='60'; -- FV Gems TV  
 # UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and sourceid='1'; -- FS XY 
 --
 -- Thane Direct
 #UPDATE channel SET name='Thane Direct', callsign='Thane Direct' WHERE name='Thane Direct' and freqid='60'; -- FV Thane Direct  
 UPDATE channel SET name='Thane Direct', channum=754, visible=1, callsign='Thane Direct' WHERE name='Thane Direct' and sourceid='1'; -- FS Thane Direct 
 --

  -- Ideal World
 UPDATE channel SET name='Ideal World', channum=755, visible=1, callsign='Ideal World' WHERE name='Ideal World' and freqid='55'; -- FV Ideal World  
 UPDATE channel SET name='Ideal World', channum=755, callsign='Ideal World' WHERE name='Ideal World' and sourceid='1'; -- FS Ideal World 
 --
   -- Ideal Extra
 #UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and freqid='60'; -- FV XY  
 UPDATE channel SET name='Ideal Extra', channum=756, visible=1, callsign='Ideal Extra' WHERE name='Ideal Extra' and sourceid='1'; -- FS Ideal Extra 
 --
   -- Jewellery Ch.
 UPDATE channel SET name='Jewellery Ch.', channum=757, visible=1, callsign='Jewellery Ch.' WHERE name='Jewellery Ch.' and freqid='50'; -- FV Jewellery Ch.  
 UPDATE channel SET name='Jewellery Ch.', channum=757, visible=1, callsign='Jewellery Ch.' WHERE name='Jewellery Ch.' and sourceid='1'; -- FS Jewellery Ch. 
 --
  -- QVC Beauty
 UPDATE channel SET name='QVC Beauty', channum=758, visible=1, callsign='QVC Beauty' WHERE name='QVC Beauty' and freqid='55'; -- FV QVC Beauty  
 # UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and sourceid='1'; -- FS XY 
 --
  -- Rocks & Co 1
 UPDATE channel SET name='Rocks & Co 1', channum=759, visible=1, callsign='Rocks & Co 1' WHERE name='Rocks & Co 1' and freqid='55'; -- FV Rocks & Co 1  
# UPDATE channel SET name='XY', callsign='XY' WHERE name='XY' and sourceid='1'; -- FS XY 
 --
 -- The Store
 UPDATE channel SET name='The Store', channum=760, visible=1, callsign='The Store' WHERE name='The Store' and freqid='50'; -- FV The Store  
 UPDATE channel SET name='The Store', channum=760, visible=1, callsign='The Store' WHERE name='The Store' and sourceid='1'; -- FS The Store 
 --
  #UPDATE channel SET channum=803, visible=1 WHERE name='Pitch TV';
 #UPDATE channel SET channum=805, visible=1 WHERE name='TV Shop';
 #UPDATE channel SET channum=806, visible=1 WHERE name='JML Home & DIY';
 #UPDATE channel SET channum=807, visible=1 WHERE name='JML Choice';
 #UPDATE channel SET channum=808, visible=1 WHERE name='JML Direct';
 #UPDATE channel SET channum=809, visible=1 WHERE name='JML Cookshop';
 #UPDATE channel SET channum=813, visible=1 WHERE name='Create & Craft';
 #UPDATE channel SET name='Speed Auction TV', callsign='Speed Auction TV' WHERE name='speedauctiontv';
 #UPDATE channel SET channum=814, visible=1 WHERE name='Speed Auction TV';
 #UPDATE channel SET channum=817, visible=1 WHERE name='Rocks & Co 1';
 #UPDATE channel SET channum=818, visible=1 WHERE name='The Store'and freqid='50'; -- FV The Store 
 
 -- Gaming and Dating;
 -- Adult;
# UPDATE channel SET name='Babestation', callsign='Babestation' WHERE name='ADULT Babestn';
# UPDATE channel SET channum=870, visible=1 WHERE name='Babestation';
# UPDATE channel SET name='SmileTV2', callsign='SmileTV2' WHERE name='ADULT smileTV2';
# UPDATE channel SET channum=872, visible=1 WHERE name='SmileTV2';
# UPDATE channel SET name='SmileTV3', callsign='SmileTV3' WHERE name='ADULT smileTV3';
# UPDATE channel SET channum=873, visible=1 WHERE name='SmileTV3';
# UPDATE channel SET channum=874, visible=1 WHERE name='Television X';
# UPDATE channel SET name='PARTY', callsign='PARTY' WHERE name='ADULT PARTY';
# UPDATE channel SET channum=875, visible=1 WHERE name='PARTY';
# UPDATE channel SET name='TMTV', callsign='TMTV' WHERE name='ADULT TMTV';
# UPDATE channel SET channum=876, visible=1 WHERE name='TMTV';
# UPDATE channel SET name='Filth', callsign='Filth' WHERE name='ADULT Filth';
# UPDATE channel SET channum=877, visible=1 WHERE name='Filth';
# UPDATE channel SET name='Bluekiss', callsign='Bluekiss' WHERE name='ADULT Bluekiss';
# UPDATE channel SET channum=878, visible=1 WHERE name='Bluekiss';
# UPDATE channel SET name='Redhot TV', callsign='Redhot TV' WHERE name='ADULT redhotTv';
# UPDATE channel SET channum=879, visible=1 WHERE name='Redhot TV';
#
 -- Testing;
 UPDATE channel SET name='BBC Sport Interactive', callsign='BBC Sport Interactive' WHERE name='BBC Red Button';
 UPDATE channel SET name='BBC Sport Interactive', callsign='BBC Sport Interactive' WHERE name='BBC Sport Interactive: BBC1';
 UPDATE channel SET channum=900, visible=1, xmltvid="interactive.sport.bbc.co.uk" WHERE name='BBC Sport Interactive';
 UPDATE channel SET name='BBC Sport Interactive: BBC1', callsign='BBC Sport Interactive: BBC1' WHERE name='301';
 UPDATE channel SET name='BBC Sport Interactive: BBC1', callsign='BBC Sport Interactive: BBC1' WHERE name='BBC RB 301';
 UPDATE channel SET channum=901, visible=1, xmltvid="bbc1.interactive.sport.bbc.co.uk" WHERE name='BBC Sport Interactive: BBC1';
 UPDATE channel SET name='BBC Sport Interactive: BBC2', callsign='BBC Sport Interactive: BBC2' WHERE name='302';
 UPDATE channel SET channum=902, visible=1, xmltvid="bbc2.interactive.sport.bbc.co.uk" WHERE name='BBC Sport Interactive: BBC2';
 UPDATE channel SET name='BBC Sport Interactive: BBC3', callsign='BBC Sport Interactive: BBC3' WHERE name='303';
 UPDATE channel SET channum=903, visible=1, xmltvid="bbc3.interactive.sport.bbc.co.uk" WHERE name='BBC Sport Interactive: BBC3';

-- Regions;

-- BBC1, channun 101
# UPDATE channel SET name='BBC One', callsign='BBC One' WHERE name='BBC ONE Oxf' and freqid='53'; -- FV100%  BBC 1 oxf 
# UPDATE channel SET name='BBC One', callsign='BBC One' WHERE name='BBC 1 Oxford' and sourceid='1';
# UPDATE channel SET name='BBC One', callsign='BBC One' WHERE name='BBC 1';
# UPDATE channel SET channum=101, visible=1, xmltvid="oxford.south.bbc1.bbc.co.uk "WHERE name='BBC One';

 #UPDATE channel SET name='BBC One', callsign='BBC One' WHERE name='BBC 1 South';
 #UPDATE channel SET name='BBC One', callsign='BBC One' WHERE name='BBC ONE';
 #UPDATE channel SET channum=101, visible=1, xmltvid="south.bbc1.bbc.co.uk" WHERE name='BBC One'; 


 UPDATE channel SET channum=909, xmltvid="scotland.bbc1.bbc.co.uk", visible=1 WHERE name = 'BBC 1 Scotland'; 
 UPDATE channel SET channum=910, xmltvid="ci.south-west.bbc1.bbc.co.uk", visible=1 WHERE name = 'BBC 1 CI';
 UPDATE channel SET channum=911, xmltvid="east-midlands.bbc1.bbc.co.uk",  visible=1 WHERE name = 'BBC 1 E Mids';
 UPDATE channel SET channum=912, xmltvid="east.bbc1.bbc.co.uk",  visible=1 WHERE name = 'BBC 1 East (E)';
 UPDATE channel SET channum=913, xmltvid="west.east.bbc1.bbc.co.uk",  visible=1 WHERE name = 'BBC 1 East (W)';
 UPDATE channel SET channum=914, xmltvid="london.bbc1.bbc.co.uk",  visible=1 WHERE name = 'BBC 1 London';
 UPDATE channel SET channum=915, xmltvid="north-west.bbc1.bbc.co.uk",  visible=1 WHERE name = 'BBC 1 N West';
 UPDATE channel SET channum=916, xmltvid="north-east.bbc1.bbc.co.uk",  visible=1 WHERE name = 'BBC 1 NE & C';
 UPDATE channel SET channum=917, xmltvid="northern-ireland.bbc1.bbc.co.uk",  visible=1 WHERE name = 'BBC 1 NI';
 # UPDATE channel SET channum=918, xmltvid="oxford.south.bbc1.bbc.co.uk",  visible=1 WHERE name = 'BBC 1 Oxford';
 UPDATE channel SET channum=919, xmltvid="south-east.bbc1.bbc.co.uk",  visible=1 WHERE name = 'BBC 1 S East';
 UPDATE channel SET channum=920, xmltvid="south-west.bbc1.bbc.co.uk",  visible=1 WHERE name = 'BBC 1 S West';
 UPDATE channel SET channum=921, xmltvid="south.bbc2.bbc.co.uk",  visible=1 WHERE name = 'BBC 1 South';
 UPDATE channel SET channum=922, xmltvid="midlands.bbc1.bbc.co.uk",  visible=1 WHERE name = 'BBC 1 W Mids';
 UPDATE channel SET channum=923, xmltvid="wales.bbc1.bbc.co.uk",  visible=1 WHERE name = 'BBC 1 Wales';
 UPDATE channel SET channum=924, xmltvid="west.bbc1.bbc.co.uk",  visible=1 WHERE name = 'BBC 1 West';
 UPDATE channel SET channum=925, xmltvid="yorkshire.bbc1.bbc.co.uk",  visible=1 WHERE name = 'BBC 1 Yorks';
 UPDATE channel SET channum=926, xmltvid="yorkslincs.bbc1.bbc.co.uk",  visible=1 WHERE name = 'BBC 1 Yrks&Lin';

 
-- BBC2, channum 102
# UPDATE channel SET name='BBC Two', callsign='BBC Two' WHERE name='BBC 2 England';
# UPDATE channel SET name='BBC Two', callsign='BBC Two' WHERE name='BBC 2';
# UPDATE channel SET name='BBC Two', callsign='BBC Two' WHERE name='BBC TWO';
# UPDATE channel SET channum=xxx, xmltvid="bbc2.bbc.co.uk", visible=1 WHERE name='BBC Two';
# 
# UPDATE channel SET channum=927,  xmltvid="scotland.bbc2.bbc.co.uk", visible=1 WHERE name = 'BBC 2 Scotland'; 
# UPDATE channel SET channum=928,  xmltvid="bbc2.bbc.co.uk", visible=1 WHERE name = 'BBC 2 England';
# UPDATE channel SET channum=929,  xmltvid="northern-ireland.bbc2.bbc.co.uk", visible=1 WHERE name = 'BBC 2 NI';
# UPDATE channel SET channum=930,  xmltvid="wales.bbc2.bbc.co.uk", visible=1 WHERE name = 'BBC 2 Wales';
 -- 

-- BBC1 HD, channum 108
# UPDATE channel SET name='BBC One HD', callsign='BBC One HD' WHERE name='BBC1 HD';
# UPDATE channel SET name='BBC One HD', callsign='BBC One HD' WHERE name='BBC One HD' and freqid='57'; -- FV100% BBC ONE HD 
# UPDATE channel SET channum=108, visible=1, xmltvid="hd.bbc1.bbc.co.uk" WHERE name='BBC One HD';

 UPDATE channel SET channum=932, xmltvid="hd.northern-ireland.bbc1.bbc.co.uk", visible=1 WHERE name = 'BBC 1 NI HD';
 UPDATE channel SET channum=933, xmltvid="hd.scotland.bbc1.bbc.co.uk", visible=1 WHERE name = 'BBC 1 Scot HD';
 UPDATE channel SET channum=934, xmltvid="hd.wales.bbc1.bbc.co.uk", visible=1 WHERE name = 'BBC 1 Wal HD';
  
 
-- ITV1, channum 103
-- taken from lyngsat & http://www.a516digital.com/2013/04/non-freesat-channel-highlights-channel.html 
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="london.itv1.itv.co.uk", channel.channum=940, channel.name='ITV London', channel.callsign='ITV London' WHERE channel.serviceid=10060 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10758500 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="granada.itv1.itv.co.uk", channel.channum=941, channel.name='ITV Granada', channel.callsign='ITV Granada' WHERE channel.serviceid=10080 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10758500 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="anglia.itv1.itv.co.uk", channel.channum=942, channel.name='ITV Anglia East', channel.callsign='ITV Anglia East' WHERE channel.serviceid=10090 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10758500 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="central.itv1.itv.co.uk", channel.channum=943, channel.name='ITV Central West', channel.callsign='ITV Central West' WHERE channel.serviceid=10100 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10758500 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="wales.itv1.itv.co.uk", channel.channum=944, channel.name='ITV Wales', channel.callsign='ITV Wales' WHERE channel.serviceid=10020 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10832250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="west.itv1.itv.co.uk", channel.channum=945, channel.name='ITV West', channel.callsign='ITV West' WHERE channel.serviceid=10030 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10832250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="westcountry.itv1.itv.co.uk", channel.channum=946, channel.name='ITV Westcountry', channel.callsign='ITV Westcountry' WHERE channel.serviceid=10040 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10832250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="border.itv1.itv.co.uk", channel.channum=947, channel.name='ITV Border', channel.callsign='ITV Border' WHERE channel.serviceid=10120 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="tynetees.itv1.itv.co.uk", channel.channum=948, channel.name='ITV Tyne Tees', channel.callsign='ITV Tyne Tees' WHERE channel.serviceid=10130 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
# UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="meridian.itv1.itv.co.uk", channel.channum=949, channel.name='ITV Meridian South', channel.callsign='ITV Meridian South' WHERE channel.serviceid=10140 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="meridian.itv1.itv.co.uk", channel.channum=950, channel.name='ITV Meridian East', channel.callsign='ITV Meridian East' WHERE channel.serviceid=10150 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="yorkshire.itv1.itv.co.uk", channel.channum=951, channel.name='ITV Yorkshire', channel.callsign='ITV Yorkshire' WHERE channel.serviceid=10160 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="channel.itv1.itv.co.uk", channel.channum=952, channel.name='ITV Channel TV', channel.callsign='ITV Channel TV' WHERE channel.serviceid=10200 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10906000 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="north.stv.tv", channel.channum=953, channel.name='STV North', channel.callsign='STV North' WHERE channel.serviceid=10210 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10906000 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="central.itv1.itv.co.uk", channel.channum=954, channel.name='STV Central West', channel.callsign='STV Central West' WHERE channel.serviceid=10220 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10906000 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="central.stv.tv", channel.channum=955, channel.name='STV Central East', channel.callsign='STV Central East' WHERE channel.serviceid=10221 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10906000 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="u.tv", channel.channum=956, channel.name='UTV', channel.callsign='UTV' WHERE channel.serviceid=10230 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10906000 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="meridian.itv1.itv.co.uk", channel.channum=957, channel.name='ITV Meridian North', channel.callsign='ITV Meridian North' WHERE channel.serviceid=12101 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10993750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="anglia.itv1.itv.co.uk", channel.channum=958, channel.name='ITV Anglia West', channel.callsign='ITV Anglia West' WHERE channel.serviceid=12110 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10993750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="yorkshire.itv1.itv.co.uk", channel.channum=959, channel.name='ITV Yorkshire East', channel.callsign='ITV Yorkshire East' WHERE channel.serviceid=12120 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10993750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="central.itv1.itv.co.uk", channel.channum=960, channel.name='ITV Central South West', channel.callsign='ITV Central South West' WHERE channel.serviceid=12140 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10993750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="central.itv1.itv.co.uk", channel.channum=961, channel.name='ITV Central South', channel.callsign='ITV Central South' WHERE channel.serviceid=20700 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=11052750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="central.itv1.itv.co.uk", channel.channum=962, channel.name='ITV Central East', channel.callsign='ITV Central East' WHERE channel.serviceid=20701 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=11052750 and dtv_multiplex.fec='5/6';
 
 
 #UPDATE channel SET name='STV', callsign='STV' WHERE name='STV Central West';
 #UPDATE channel SET channum=103, visible=1 WHERE name='STV';
 #UPDATE channel SET name='ITV1', callsign='ITV1' WHERE name='ITV Meridian North';
 #UPDATE channel SET name='ITV1', callsign='ITV1' WHERE name='ITV Meridian East';
 #UPDATE channel SET name='ITV1', callsign='ITV1' WHERE name='ITV';
 #UPDATE channel SET name='ITV1', callsign='ITV1' WHERE name='ITV Meridian South';
 #UPDATE channel SET channum=103, visible=1, xmltvid="meridian.itv1.itv.co.uk"  WHERE name='ITV1';
   
 
-- ITV1 HD, channum 119
 #UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="hd.london-macro.itv1.itv.co.uk", channel.channum=963, channel.name='ITV London HD', channel.callsign='ITV London HD' WHERE channel.serviceid=10000 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10832250 and dtv_multiplex.fec='5/6';
#  UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="hd.london-macro.itv1.itv.co.uk", channel.channum=963, channel.name='ITV London HD', channel.callsign='ITV London HD' WHERE channel.serviceid=20780 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=11052750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="hd.northwest-macro.itv1.itv.co.uk", channel.channum=964, channel.name='ITV Granada HD', channel.callsign='ITV Granada HD' WHERE channel.serviceid=12130 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10993750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="", channel.channum=965, channel.name='STV HD', channel.callsign='STV HD' WHERE channel.serviceid=3855 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=23000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10935500 and dtv_multiplex.fec='8/9';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="hd.southeast-macro.itv1.itv.co.uk", channel.channum=966, channel.name='ITV Meridian S. HD', channel.callsign='ITV Meridian S. HD' WHERE channel.serviceid=3851 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=23000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10935500 and dtv_multiplex.fec='8/9';
 #UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="", channel.channum=967, channel.name='ITV Central West HD', channel.callsign='ITV Central West HD' WHERE channel.serviceid=3852 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=23000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10935500 and dtv_multiplex.fec='8/9';
 #UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="", channel.channum=965, channel.name='STV HD', channel.callsign='STV HD' WHERE channel.serviceid=3855 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=23000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10935500 and dtv_multiplex.fec='2/3';
 #UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="", channel.channum=966, channel.name='ITV Meridian S. HD', channel.callsign='ITV Meridian S. HD' WHERE channel.serviceid=3851 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=23000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10935500 and dtv_multiplex.fec='2/3';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="hd.central-macro.itv1.itv.co.uk", channel.channum=967, channel.name='ITV Central West HD', channel.callsign='ITV Central West HD' WHERE channel.serviceid=3852 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=23000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10935500 and dtv_multiplex.fec='2/3';

 #UPDATE channel SET channum=119, visible=1 WHERE name='STV HD';
 #UPDATE channel SET name='ITV1 HD', callsign='ITV1 HD' WHERE name='ITV HD';

 #UPDATE channel SET name='ITV1 HD', callsign='ITV1 HD' WHERE name='ITV HD';
 #UPDATE channel SET channum=119, visible=1, xmltvid="hd.southeast-macro.itv1.itv.co.uk" WHERE name='ITV1 HD';
 
 
-- ITV1 +1, channum 140
 # Used as prime UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="tsod.plus-1.meridian.itv1.itv.co.uk", channel.channum=968, channel.name='ITV+1 Meridian SE', channel.callsign='ITV+1 Meridian SE' WHERE channel.serviceid=10101 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10758500 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="tsod.plus-1.wales.itv1.itv.co.uk", channel.channum=969, channel.name='ITV+1 Wales', channel.callsign='ITV+1 Wales' WHERE channel.serviceid=20715 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=11052750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="tsod.plus-1.tynetees.itv1.itv.co.uk", channel.channum=970, channel.name='ITV+1 Tyne Tees', channel.callsign='ITV+1 Tyne Tees' WHERE channel.serviceid=20735 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=11052750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="tsod.plus-1.west.itv1.itv.co.uk", channel.channum=971, channel.name='ITV+1 West', channel.callsign='ITV+1 West' WHERE channel.serviceid=20745 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=11052750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="tsod.plus-1.anglia.itv1.itv.co.uk", channel.channum=972, channel.name='ITV+1 Anglia East', channel.callsign='ITV+1 Anglia East' WHERE channel.serviceid=10055 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10832250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=973, channel.name='ITV+1 Central West', channel.callsign='ITV+1 Central West' WHERE channel.serviceid=10145 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="tsod.plus-1.westcountry.itv1.itv.co.uk", channel.channum=974, channel.name='ITV+1 Westcountry', channel.callsign='ITV+1 Westcountry' WHERE channel.serviceid=10125 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="tsod.plus-1.london.itv1.itv.co.uk", channel.channum=975, channel.name='ITV+1 London', channel.callsign='ITV+1 London' WHERE channel.serviceid=10155 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="tsod.plus-1.northwest-macro.itv1.itv.co.uk", channel.channum=976, channel.name='ITV+1 Granada', channel.callsign='ITV+1 Granada' WHERE channel.serviceid=10255 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10906000 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="tsod.plus-1.meridian.itv1.itv.co.uk", channel.channum=977, channel.name='ITV+1 Meridian South', channel.callsign='ITV+1 Meridian South' WHERE channel.serviceid=10265 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10906000 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="plus-1.stv.tv", channel.channum=978, channel.name='STV+1 Central East', channel.callsign='STV+1 Central East' WHERE channel.serviceid=10225 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10906000 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, xmltvid="tsod.plus-1.yorkshire.itv1.itv.co.uk", channel.channum=979, channel.name='ITV+1 Yorkshire', channel.callsign='ITV+1 Yorkshire' WHERE channel.serviceid=12165 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10993750 and dtv_multiplex.fec='5/6';
 
 #UPDATE channel SET name='STV +1', callsign='STV +1' WHERE name='STV+1';
 #UPDATE channel SET channum=140, visible=1 WHERE name='STV +1';
 #UPDATE channel SET name='ITV1 +1', callsign='ITV1 +1' WHERE name='ITV +1';
 
# UPDATE channel SET name='ITV1 +1', callsign='ITV1 +1' WHERE name='ITV+1 Meridian SE';
# UPDATE channel SET name='ITV1 +1', callsign='ITV1 +1' WHERE name='ITV+1 Meridian South';
# UPDATE channel SET channum=140, visible=1, xmltvid="tsod.plus-1.itv1.itv.co.uk" WHERE name='ITV1 +1';
 
-- Channel 4
UPDATE channel SET visible=1, channum=980, xmltvid="channel4.com", name='Channel 4 London', callsign='Channel 4 London' WHERE serviceid=9211;
# UPDATE channel SET visible=1, channum=980, xmltvid="channel4.com", name='Channel 4 South & East', callsign='Channel 4 SE' WHERE serviceid=9212;
UPDATE channel SET visible=1, channum=981, xmltvid="channel4.com", name='Channel 4 Midlands', callsign='Channel 4 Midlands' WHERE serviceid=9213;
UPDATE channel SET visible=1, channum=982, xmltvid="channel4.com", name='Channel 4 North', callsign='Channel 4 North' WHERE serviceid=9214;
UPDATE channel SET visible=1, channum=983, xmltvid="channel4.com", name='Channel 4 Northern Ireland', callsign='Channel 4 NI' WHERE serviceid=9215;
UPDATE channel SET visible=1, channum=984, xmltvid="channel4.com", name='Channel 4 Scotland', callsign='Channel 4 Scotland' WHERE serviceid=9216;

 UPDATE channel SET visible=1, channum=988, xmltvid="plus-1.channel4.com", name='Channel 4 London +1', callsign='Channel 4 London +1' WHERE serviceid=8311;
# UPDATE channel SET visible=1, channum=989, xmltvid="plus-1.channel4.com", name='Channel 4 South & East +1', callsign='Channel 4 SE +1' WHERE serviceid=8312;
UPDATE channel SET visible=1, channum=990, xmltvid="plus-1.channel4.com",name='Channel 4 Midlands +1', callsign='Channel 4 Midlands +1' WHERE serviceid=8313;
UPDATE channel SET visible=1, channum=991, xmltvid="plus-1.channel4.com", name='Channel 4 North +1', callsign='Channel 4 North +1' WHERE serviceid=8314;
UPDATE channel SET visible=1, channum=992, xmltvid="plus-1.channel4.com", name='Channel 4 Northern Ireland +1', callsign='Channel 4 NI +1' WHERE serviceid=8315;
UPDATE channel SET visible=1, channum=993, xmltvid="plus-1.channel4.com", name='Channel 4 Scotland +1', callsign='Channel 4 Scotland +1' WHERE serviceid=8316;

UPDATE channel SET name='Channel 5-R2', visible=1, channum=995, xmltvid="channel5.co.uk", callsign='Channel 5' WHERE serviceid=7701;
UPDATE channel SET name='Channel 5-R3', visible=1, channum=996, xmltvid="channel5.co.uk", callsign='Channel 5' WHERE serviceid=7702;
UPDATE channel SET name='Channel 5-R4', visible=1, channum=997, xmltvid="channel5.co.uk", callsign='Channel 5' WHERE serviceid=7703;
UPDATE channel SET name='Channel 5-R5', visible=1, channum=998, xmltvid="channel5.co.uk", callsign='Channel 5' WHERE serviceid=7704;

# UPDATE channel SET name='Channel 4',  xmltvid="channel4.com", callsign='Channel 4', channum=104, visible=1 WHERE name='Channel 4 London';
# UPDATE channel SET name='Channel 4 +1', xmltvid="plus-1.channel4.com", callsign='Channel 4 +1', channum=121, visible=1 WHERE name='Channel 4 London +1'; 
 
-- Mark BBC channels as addfree and not requiring commercial flagging.
UPDATE channel SET commmethod=-2 WHERE name LIKE '%BBC%' OR name = 'CBeebies';

-- Set Default Channel to a valid entry
UPDATE settings SET data=(SELECT channum FROM channel WHERE channum > 100 ORDER BY channum ASC LIMIT 1) WHERE value='DefaultTVChannel';

-- Set Smart Channel Changing (instant change on 3rd Digit)
UPDATE settings SET data = 1 WHERE value='SmartChannelChange';


 -- Script to update channel numbers in a combined Freeview & Freesat system in
 -- the UK. 
 -- This script is based on and inspired by the work of Richard Lainchbury and Stephen Robertson 
 -- posted on the mythtv-users mailing list: users@mythtv.org
 -- for access to the mailing list see http://www.mythtv.org/support
 -- use this script carefully; have multiple same channels from different sources
 -- on the same channel number is how MythTV is supposed to be configured based on 
 -- a number of posts from developers, but this should be carefully tested.
 
 -- Ensure you complete a backup of your channel database table before using
 -- script (you can use the -h option to select an alternative server if not 
 -- running locally):
 -- $ mysqldump -uroot -p mythconverg.channel > `date +%d%m%y`-channel.sql
 -- to restore the backup:
 -- mysql -uroot -p --database mythconverg < `date +%d%m%y`-channel.sql
 -- to run this channel altering script:
 -- mysql -uroot -p -h192.168.0.2 --database mythconverg < alter-channels.sql
 -- run mythfilldatabase after you have made these changes.
 
 -- Why would you do this:
 -- channels which have the same name and callsign are treated as being EXACTLY
 -- the same channel by mythtv. To get them to only appear once, we set them as
 -- having the same channum as well.
 
 -- for instance Freeview ITV in in fact the regional variation of ITV for the
 -- broadcast area; such as Meridian south. On Freesat ITV1 Meridian South is 
 -- broadcast alongside ITV1 Grenada and all the other variations. In order for
 -- mythtv to know what channels are equal, we disregard all the other regional
 -- variations and set Meridian south as having the same name as the freeview
 -- channel ITV1. This has two drawbacks; 1. reduces the opportunity for Mythtv
 -- to use multi-record if an alternative regional variation is on a multiplexes
 -- that would permit a second channel to be recorded. 2. There maybe a 
 -- programme broadcast on a regional variation that you would have been 
 -- interested in. The benefit is a much easier to manage EPG.
 
 -- WARNING: If you are using broadcast EPG information (EIT) then the channels
 -- that are paired; e.g. Five on satellite and Five on terrestrial are both on
 -- channel number 5; the EPG information must be identical. If you have issues
 -- with 'NO DATA' assign each individual channel instance in the MythWeb
 -- channel editor to a separate number to identify which instance is creating
 -- an issue.
 
 -- How does this script do it
 -- move all the channels to numbers well outside the normal range (+100000) to
 -- their current number and set them as hidden; we will then go through and
 -- assign sensible numbers to those channels we would like to see in the EPG 
 -- and at the same time mark those channels visible.
 
 -- After moving all the channels out of the way there are only three different 
 -- statements in this script; 
 -- 1. Correct the naming of channels
 -- 2. For all the channels of the same name assign the same channel number 
 -- 3. the last statement in this script sets all the BBC channels as not 
 --    requiring commercial flagging as they don't carry adverts.
 
 UPDATE channel SET channum = channum+100000, visible=FALSE;
 
 -- Entertainment;
 -- see regions for BBC1, BBC2, ITV1, ITV1 +1, ITV1 HD
 
 -- BBC One, 101
 -- BBC Two, 102
 -- ITV1, 103
 UPDATE channel SET name='Channel4', callsign='Channel4' WHERE name='Channel 4';
 UPDATE channel SET channum=104, visible=1, xmltvid="channel4.com" WHERE name='Channel4';
 UPDATE channel SET name='Channel5', callsign='Channel5' WHERE name='Channel 5';
 UPDATE channel SET channum=105, visible=1, xmltvid="channel5.co.uk" WHERE name='Channel5';
 UPDATE channel SET name='BBC Three', callsign='BBC Three' WHERE name='BBC THREE';
 UPDATE channel SET channum=106, visible=1, xmltvid="bbcthree.bbc.co.uk" WHERE name='BBC Three';
 UPDATE channel SET name='BBC Four', callsign='BBC Four' WHERE name='BBC FOUR';
 UPDATE channel SET channum=107, visible=1, xmltvid="bbcfour.bbc.co.uk" WHERE name='BBC Four';
 -- BBC One HD, 108
 UPDATE channel SET name='BBC Two HD', callsign='BBC Two HD' WHERE name='BBC2 HD';
 UPDATE channel SET channum=109, visible=1, xmltvid="hd.bbc2.bbc.co.uk" WHERE name='BBC Two HD';
 UPDATE channel SET channum=110, visible=1, xmltvid="alba.bbc.co.uk" WHERE name='BBC Alba';
 UPDATE channel SET channum=111, visible=1, xmltvid="dave.uktv.co.uk" WHERE name='Dave'; 
 UPDATE channel SET channum=112, visible=1, xmltvid="tsod.plus1.dave.uktv.co.uk" WHERE name='Dave ja vu'; 
 UPDATE channel SET channum=113, visible=1, xmltvid="itv2.itv.co.uk" WHERE name='ITV2';
 UPDATE channel SET name='ITV2 +1', callsign='ITV2 +1' WHERE name='ITV2+1';
 UPDATE channel SET channum=114, visible=1, xmltvid="tsod.plus-1.itv2.itv.co.uk" WHERE name='ITV2 +1';
 UPDATE channel SET channum=115, visible=1, xmltvid="itv3.itv.co.uk" WHERE name='ITV3';
 UPDATE channel SET name='ITV3 +1', callsign='ITV3 +1' WHERE name='ITV3+1';
 UPDATE channel SET channum=116, visible=1, xmltvid="tsod.plus-1.itv3.itv.co.uk" WHERE name='ITV3 +1';
 UPDATE channel SET channum=117, visible=1, xmltvid="itv4.itv.co.uk" WHERE name='ITV4';
 UPDATE channel SET name='ITV4 +1', callsign='ITV4 +1' WHERE name='ITV4+1';
 UPDATE channel SET channum=118, visible=1, xmltvid="tsod.plus-1.itv4.itv.co.uk" WHERE name='ITV4 +1';
 -- ITV1 HD, 119
 #UPDATE channel SET channum=120 WHERE name='S4C Digidol';
 UPDATE channel SET name='Channel4 +1', callsign='Channel4 +1' WHERE name='Channel 4 +1';
 UPDATE channel SET name='Channel4 +1', callsign='Channel4 +1' WHERE name='Channel 4+1';
 UPDATE channel SET channum=121, visible=1, xmltvid="tsod.plus-1.channel4.com" WHERE name='Channel4 +1';
 UPDATE channel SET name='E4', callsign='E4' WHERE name='e4';
 UPDATE channel SET channum=122, visible=1, xmltvid="e4.channel4.com" WHERE name='E4';
 UPDATE channel SET name='E4 +1', callsign='E4 +1' WHERE name='E4+1';
 UPDATE channel SET channum=123, visible=1, xmltvid="tsod.plus-1.e4.channel4.com" WHERE name='E4 +1';
 UPDATE channel SET name='More4', callsign='More4' WHERE name='More 4';
 UPDATE channel SET channum=124, visible=1, xmltvid="more4.channel4.com" WHERE name='More4';
 UPDATE channel SET channum=125, visible=1, xmltvid="tsod.plus-1.more4.channel4.com" WHERE name='More4 +1';
 UPDATE channel SET channum=126, visible=1 WHERE name='Channel 4 HD';
 #UPDATE channel SET channum=127, visible=1, xmltvid="freeview.1.virginmedia.com" WHERE name='Channel One';
 UPDATE channel SET channum=127, visible=1 WHERE name='Home';
 UPDATE channel SET name='Quest', callsign='Quest' WHERE name='QUEST';
 UPDATE channel SET channum=128, visible=1, xmltvid="freeview.quest.discoveryeurope.com" WHERE name='Quest'; 
 UPDATE channel SET channum=129, visible=1, xmltvid="freeview.yesterday.uktv.co.uk" WHERE name='Yesterday'; 
 UPDATE channel SET channum=130, visible=1, xmltvid="gold.uktv.co.uk" WHERE name='G.O.L.D.'; 
 UPDATE channel SET name='Sky3', callsign='Sky3' WHERE name='SKY THREE';
 UPDATE channel SET channum=131, visible=1, xmltvid="sky-three.sky.com" WHERE name='Sky3';  
 UPDATE channel SET channum=132, visible=1, xmltvid="fiver.channel5.co.uk" WHERE name='5*'; 
 UPDATE channel SET channum=133, visible=1, xmltvid="fiveusa.channel5.co.uk" WHERE name='5 USA'; 
 UPDATE channel SET channum=134, visible=1, xmltvid="drama.cbs.com" WHERE name='CBS Drama';
 UPDATE channel SET channum=135, visible=1, xmltvid="reality.cbs.com" WHERE name='CBS Reality';
 UPDATE channel SET name='CBS Reality +1', callsign='CBS Reality +1' WHERE name='CBS Reality+1';
 UPDATE channel SET channum=136, visible=1, xmltvid="tsod.plus-1.reality.cbs.com" WHERE name='CBS Reality +1';
 UPDATE channel SET channum=137, visible=1, xmltvid="action.cbs.com" WHERE name='CBS Action';
 UPDATE channel SET name='Horror Channel', callsign='Horror Channel' WHERE name='Horror Channel';
 UPDATE channel SET channum=138, visible=1, xmltvid="horror.cbs.com" WHERE name='Horror Channel';
 UPDATE channel SET name='Horror Channel +1', callsign='Horror Channel +1' WHERE name='Horror Ch+1';
 UPDATE channel SET channum=139, visible=1, xmltvid="tsod.plus-1.horror.cbs.com" WHERE name='Horror Channel +1';
 UPDATE channel SET name='Channel5 +1', callsign='Channel5 +1' WHERE name='Channel 5+1';
 -- ITV1 +1, 140 
 UPDATE channel SET channum=141, visible=1 WHERE name='Channel5 +1';
 UPDATE channel SET channum=142, visible=1 WHERE name='5* +1';
 UPDATE channel SET channum=143, visible=1 WHERE name='5 USA +1';
 UPDATE channel SET name='Pick', callsign='Pick' WHERE name='Pick FSAT';
 UPDATE channel SET channum=144, visible=1 WHERE name='Pick';
 UPDATE channel SET channum=146, visible=1 WHERE name='Pick+1';
 UPDATE channel SET channum=147, visible=1 WHERE name='Really';
 UPDATE channel SET channum=148, visible=1 WHERE name='4seven';

 
 -- News and Sport
 UPDATE channel SET channum=200, visible=1, xmltvid="news.bbc.co.uk" WHERE name='BBC News';
 UPDATE channel SET name='BBC Parliament', callsign='BBC Parliament' WHERE name='BBC PARL''MNT';
 UPDATE channel SET channum=201, visible=1, xmltvid="parliament.bbc.co.uk" WHERE name='BBC Parliament';
 #UPDATE channel SET channum=202, visible=1, xmltvid="2.s4c.co.uk" WHERE name='S4C2';
 UPDATE channel SET name='Al Jazeera English', callsign='Al Jazeera English' WHERE name='Al Jazeera Eng';
 UPDATE channel SET channum=203, visible=1, xmltvid="freeview.aljazeera.net" WHERE name='Al Jazeera English';
 UPDATE channel SET channum=204, visible=1, xmltvid="euronews.com" WHERE name='EuroNews';
 UPDATE channel SET name='CNN International', callsign='CNN International' WHERE name='CNN';
 UPDATE channel SET channum=206, visible=1 WHERE name='Russia Today';
 UPDATE channel SET channum=207, visible=1, xmltvid="freeview.europe.cnn.com" WHERE name='CNN International';
 UPDATE channel SET name='Bloomberg Television', callsign='Bloomberg Television' WHERE name='Bloomberg';
 UPDATE channel SET channum=208, visible=1, xmltvid="bloomberg.com" WHERE name='Bloomberg Television';
 UPDATE channel SET channum=209, visible=1, xmltvid="world.nhk.or.jp" WHERE name='NHK World TV';
 UPDATE channel SET channum=210, visible=1, xmltvid="europe.cnbc.com" WHERE name='CNBC';
 UPDATE channel SET channum=211, visible=1, xmltvid="sky-news.sky.com" WHERE name='Sky News'; 
 
 -- Movies;
 UPDATE channel SET channum=300, visible=1, xmltvid="filmfour.channel4.com" WHERE name='Film4';
 UPDATE channel SET name='Film4 +1', callsign='Film4 +1' WHERE name='Film4+1';
 UPDATE channel SET channum=301, visible=1, xmltvid="tsod.plus-1.filmfour.channel4.com" WHERE name='Film4 +1';
 UPDATE channel SET channum=302, visible=1, xmltvid="1.truemovies.tv" WHERE name='True Movies 1';
 UPDATE channel SET channum=303, visible=1, xmltvid="2.truemovies.tv" WHERE name='True Movies 2';
 UPDATE channel SET channum=304, visible=1, xmltvid="1.movies4men.co.uk" WHERE name='Movies4Men';
 UPDATE channel SET channum=306, visible=1, xmltvid="2.movies4men.co.uk" WHERE name='Movies4Men 2';
 UPDATE channel SET name='Movies4Men +1', callsign='Movies4Men +1' WHERE name='mov4men+1';
 UPDATE channel SET channum=307, visible=1 WHERE name='Movies4Men +1';
 UPDATE channel SET name='Movies4Men 2 +1', callsign='Movies4Men 2 +1' WHERE name='mov4men2 +1';
 UPDATE channel SET channum=308, visible=1, xmltvid="tsod.plus-1.2.movies4men.co.uk" WHERE name='Movies4Men 2 +1';
 UPDATE channel SET name='Men & Movies', callsign='Men & Movies' WHERE name='men&movies';
 UPDATE channel SET channum=309, visible=1 WHERE name='Men & Movies';
 UPDATE channel SET name='Men & Movies +1', callsign='Men & Movies +1' WHERE name='men&movs+1';
 UPDATE channel SET channum=310, visible=1 WHERE name='Men & Movies +1';
 UPDATE channel SET channum=311, visible=1 WHERE name='Movie Mix';
 UPDATE channel SET name='Men & Movies +1', callsign='Men & Movies +1' WHERE name='men&movs+1';
 UPDATE channel SET channum=312, visible=1 WHERE name='more>movies';
 UPDATE channel SET name='more>movies +1', callsign='More Movies +1' WHERE name='m>movies+1';
 UPDATE channel SET channum=313, visible=1 WHERE name='more>movies +1';
 
 
 -- Lifestyle;
 #UPDATE channel SET channum=400, visible=1, xmltvid="weddingtv.com" WHERE name='Wedding TV';
 #UPDATE channel SET channum=401, visible=1 WHERE name='Wedding TV Asia';
 #UPDATE channel SET channum=402, visible=1, xmltvid="showcase.information.tv" WHERE name='Information TV';
 #UPDATE channel SET channum=403, visible=1 WHERE name='Rural TV';
 UPDATE channel SET channum=405, visible=1, xmltvid="foodnetwork.com" WHERE name='Food Network';
 UPDATE channel SET name='Food Network +1', callsign='Food Network +1' WHERE name='Food Netwrk+1';
 UPDATE channel SET channum=406, visible=1, xmltvid="tsod.plus-1.foodnetwork.com" WHERE name='Food Network +1';
 
 -- Music;
 UPDATE channel SET channum=500, visible=1, xmltvid="chartshow.com" WHERE name='Chart Show TV';
 UPDATE channel SET channum=501, visible=1, xmltvid="" WHERE name='The Vault';
 UPDATE channel SET channum=502, visible=1, xmltvid="essentialflava.com" WHERE name='Flava';
 UPDATE channel SET channum=503, visible=1, xmltvid="uk.viva.tv" WHERE name='VIVA';
 UPDATE channel SET channum=504, visible=1, xmltvid="b4utv.com" WHERE name='B4U Music';
 UPDATE channel SET channum=505, visible=1, xmltvid="4music.channel4.com" WHERE name='4Music';
 UPDATE channel SET channum=509, visible=1 WHERE name='Zing';
 UPDATE channel SET channum=514, visible=1 WHERE name='Clubland TV';
 UPDATE channel SET channum=516, visible=1, xmltvid="scuzz.tv" WHERE name='Scuzz';
 UPDATE channel SET channum=517, visible=1, xmltvid="bliss.co.uk" WHERE name='Bliss';
 UPDATE channel SET channum=518, visible=1 WHERE name='DanceNationTV';
 
 -- Children;
 UPDATE channel SET name='CBBC', callsign='CBBC' WHERE name='CBBC Channel';
 UPDATE channel SET channum=600, visible=1, xmltvid="cbbc.bbc.co.uk" WHERE name='CBBC';
 UPDATE channel SET channum=601, visible=1, xmltvid="cbeebies.bbc.co.uk" WHERE name='CBeebies';
 UPDATE channel SET channum=602, visible=1, xmltvid="citv.itv.co.uk" WHERE name='CITV';
 UPDATE channel SET channum=603, visible=1, xmltvid="popfun.co.uk" WHERE name='POP';
 UPDATE channel SET channum=604, visible=1, xmltvid="tinypop.com" WHERE name='Tiny Pop';
 UPDATE channel SET channum=605, visible=1, xmltvid="tsod.plus-1.tinypop.com" WHERE name='Tiny Pop +1';
 UPDATE channel SET channum=606, visible=1 WHERE name='Kix!';
 UPDATE channel SET channum=607, visible=1 WHERE name='PopGirl';
 UPDATE channel SET channum=608, visible=1 WHERE name='PopGirl +1';
 UPDATE channel SET channum=609, visible=1 WHERE name='Cartoonito';
 UPDATE channel SET name='Jazeera Children', callsign='Jazeera Children' WHERE name='JazeeraChildren';
 UPDATE channel SET channum=610, visible=1 WHERE name='Jazeera Children';
 
 -- Special Interest;
 #UPDATE channel SET channum=690, visible=1 WHERE name='Inspiration';
 #UPDATE channel SET channum=691, visible=1 WHERE name='Daystar TV';
 
 -- Radio;
 UPDATE channel SET name='BBC Radio 1', callsign='BBC Radio 1' WHERE name='BBC R1';
 UPDATE channel SET channum=700, visible=1 WHERE name='BBC Radio 1';
 UPDATE channel SET name='BBC Radio 1Xtra', callsign='BBC Radio 1Xtra' WHERE name='BBC 1Xtra';
 UPDATE channel SET name='BBC Radio 1Xtra', callsign='BBC Radio 1Xtra' WHERE name='BBC R1X';
 UPDATE channel SET channum=701, visible=1 WHERE name='BBC Radio 1Xtra';
 UPDATE channel SET name='BBC Radio 2', callsign='BBC Radio 2' WHERE name='BBC R2';
 UPDATE channel SET channum=702, visible=1 WHERE name='BBC Radio 2';
 UPDATE channel SET name='BBC Radio 3', callsign='BBC Radio 3' WHERE name='BBC R3';
 UPDATE channel SET channum=703, visible=1 WHERE name='BBC Radio 3';
 UPDATE channel SET name='BBC Radio 4', callsign='BBC Radio 4' WHERE name='BBC R4 FM';
 UPDATE channel SET channum=704, visible=1 WHERE name='BBC Radio 4';
 UPDATE channel SET name='BBC Radio 5 Live', callsign='BBC Radio 5 Live' WHERE name='BBC R5L';
 UPDATE channel SET channum=705, visible=1 WHERE name='BBC Radio 5 Live';
 UPDATE channel SET name='BBC Radio 5 Live Sports Extra', callsign='BBC Radio 5 Live Sports Extra' WHERE name='BBC R5SX';
 UPDATE channel SET channum=706, visible=1 WHERE name='BBC Radio 5 Live Sports Extra';
 UPDATE channel SET channum=707, visible=1 WHERE name='BBC 6 Music';
 UPDATE channel SET channum=708, visible=1 WHERE name='BBC Radio 7';
 UPDATE channel SET name='BBC Asian Network', callsign='BBC Asian Network' WHERE name='BBC Asian Net.';
 UPDATE channel SET name='BBC Asian Network', callsign='BBC Asian Network' WHERE name='BBC Asian';
 UPDATE channel SET channum=709, visible=1 WHERE name='BBC Asian Network';
 UPDATE channel SET name='BBC Radio 4 LW', callsign='BBC Radio 4 LW' WHERE name='BBC R4 LW';
 UPDATE channel SET channum=710, visible=1 WHERE name='BBC Radio 4 LW';
 UPDATE channel SET name='BBC World Service', callsign='BBC World Service' WHERE name='BBC WS';
 UPDATE channel SET name='BBC World Service', callsign='BBC World Service' WHERE name='BBC World Sv.';
 UPDATE channel SET channum=711, visible=1 WHERE name='BBC World Service';
 UPDATE channel SET name='BBC Radio 4 Extra', callsign='BBC Radio 4 Extra' WHERE name='BBC Radio 4 Ex';
 UPDATE channel SET name='BBC Radio 4 Extra', callsign='BBC Radio 4 Extra' WHERE name='BBC R4 Ex';
 UPDATE channel SET channum=712, visible=1 WHERE name='BBC Radio 4 Extra';
 UPDATE channel SET name='BBC Radio Scotland', callsign='BBC Radio Scotland' WHERE name='BBC R Scotland';
 UPDATE channel SET name='BBC Radio Scotland', callsign='BBC Radio Scotland' WHERE name='BBC R Scot.';
 UPDATE channel SET channum=713, visible=1 WHERE name='BBC Radio Scotland';
 UPDATE channel SET name='BBC Radio Wales', callsign='BBC Radio Wales' WHERE name='BBC R Wales';
 UPDATE channel SET channum=714, visible=1 WHERE name='BBC Radio Wales';
 UPDATE channel SET name='BBC Radio Ulster', callsign='BBC Radio Ulster' WHERE name='BBC R Ulster';
 UPDATE channel SET channum=715, visible=1 WHERE name='BBC Radio Ulster';
 UPDATE channel SET name='BBC Radio London', callsign='BBC Radio London' WHERE name='BBC  London';
 UPDATE channel SET channum=716, visible=1 WHERE name='BBC Radio London';
 UPDATE channel SET channum=720, visible=1 WHERE name='Choice FM';
 UPDATE channel SET channum=721, visible=1 WHERE name='Classic FM';
 UPDATE channel SET channum=722, visible=1 WHERE name='Gold';
 UPDATE channel SET channum=723, visible=1 WHERE name='Xfm London';
 UPDATE channel SET channum=724, visible=1 WHERE name='Absolute Radio';
 UPDATE channel SET name='Absolute Classic Rock', callsign='Absolute Classic Rock' WHERE name='absolute CR';
 UPDATE channel SET channum=725, visible=1 WHERE name='Absolute Classic Rock';
 UPDATE channel SET name='Absolute 80s', callsign='Absolute 80s' WHERE name='absolute80s';
 UPDATE channel SET channum=726, visible=1 WHERE name='Absolute 80s';
 UPDATE channel SET name='NME Radio', callsign='NME Radio' WHERE name='NME';
 UPDATE channel SET channum=727, visible=1 WHERE name='NME Radio';
 UPDATE channel SET name='WRN Radio', callsign='WRN Radio' WHERE name='WRN europe';
 UPDATE channel SET channum=728, visible=1 WHERE name='WRN Radio';
 UPDATE channel SET channum=729, visible=1 WHERE name='Jazz FM';
 UPDATE channel SET channum=730, visible=1 WHERE name='Planet Rock';
 UPDATE channel SET channum=731, visible=1 WHERE name='Talksport';
 UPDATE channel SET channum=732, visible=1 WHERE name='Q';
 UPDATE channel SET channum=733, visible=1 WHERE name='Magic';
 UPDATE channel SET channum=734, visible=1 WHERE name='The Hits Radio';
 UPDATE channel SET channum=735, visible=1 WHERE name='Smooth Radio';
 UPDATE channel SET channum=736, visible=1 WHERE name='Kerrang!';
 UPDATE channel SET channum=737, visible=1 WHERE name='heat';
 UPDATE channel SET channum=738, visible=1 WHERE name='Kiss';
 UPDATE channel SET channum=738, visible=1 WHERE name='Heart';
 UPDATE channel SET channum=738, visible=1 WHERE name='Smash Hits!';
 UPDATE channel SET channum=750, visible=1 WHERE name='RTE Radio 1';
 UPDATE channel SET name='Insight Radio', callsign='Insight Radio' WHERE name='insightradio';
 UPDATE channel SET channum=777, visible=1 WHERE name='Insight Radio';
 UPDATE channel SET channum=786, visible=1 WHERE name='BFBS Radio';
 UPDATE channel SET channum=790, visible=1 WHERE name='TWR';
 
 -- Shopping;
 #UPDATE channel SET channum=800, visible=1, xmltvid="qvcuk.com" WHERE name='QVC';
 #UPDATE channel SET channum=801, visible=1, xmltvid="price-drop.tv" WHERE name='price-drop tv';
 #UPDATE channel SET channum=802, visible=1, xmltvid="bid.tv" WHERE name='bid tv';
 #UPDATE channel SET channum=803, visible=1 WHERE name='Pitch TV';
 #UPDATE channel SET channum=804, visible=1, xmltvid="gemstv.co.uk" WHERE name='Gems TV';
 #UPDATE channel SET channum=805, visible=1 WHERE name='TV Shop';
 #UPDATE channel SET channum=806, visible=1 WHERE name='JML Home & DIY';
 #UPDATE channel SET channum=807, visible=1 WHERE name='JML Choice';
 #UPDATE channel SET channum=808, visible=1 WHERE name='JML Direct';
 #UPDATE channel SET channum=809, visible=1 WHERE name='JML Cookshop';
 #UPDATE channel SET channum=810, visible=1 WHERE name='Thane Direct';
 #UPDATE channel SET channum=812, visible=1, xmltvid="idealworld.tv" WHERE name='Ideal World';
 #UPDATE channel SET channum=813, visible=1 WHERE name='Create & Craft';
 #UPDATE channel SET name='Speed Auction TV', callsign='Speed Auction TV' WHERE name='speedauctiontv';
 #UPDATE channel SET channum=814, visible=1 WHERE name='Speed Auction TV';
 #UPDATE channel SET name='The Jewellery Channel', callsign='The Jewellery Channel' WHERE name='Jewellery ch.';
 #UPDATE channel SET channum=815, visible=1 WHERE name='The Jewellery Channel';
 #UPDATE channel SET channum=816, visible=1 WHERE name='QVC Beauty';
 #UPDATE channel SET channum=817, visible=1 WHERE name='Rocks & Co 1';
 
 -- Gaming and Dating;
 
 -- Adult;
 #UPDATE channel SET name='Babestation', callsign='Babestation' WHERE name='ADULT Babestn';
 #UPDATE channel SET channum=870, visible=1 WHERE name='Babestation';
 #UPDATE channel SET name='SmileTV2', callsign='SmileTV2' WHERE name='ADULT smileTV2';
 #UPDATE channel SET channum=872, visible=1 WHERE name='SmileTV2';
 #UPDATE channel SET name='SmileTV3', callsign='SmileTV3' WHERE name='ADULT smileTV3';
 #UPDATE channel SET channum=873, visible=1 WHERE name='SmileTV3';
 #UPDATE channel SET channum=874, visible=1 WHERE name='Television X';
 #UPDATE channel SET name='PARTY', callsign='PARTY' WHERE name='ADULT PARTY';
 #UPDATE channel SET channum=875, visible=1 WHERE name='PARTY';
 #UPDATE channel SET name='TMTV', callsign='TMTV' WHERE name='ADULT TMTV';
 #UPDATE channel SET channum=876, visible=1 WHERE name='TMTV';
 #UPDATE channel SET name='Filth', callsign='Filth' WHERE name='ADULT Filth';
 #UPDATE channel SET channum=877, visible=1 WHERE name='Filth';
 #UPDATE channel SET name='Bluekiss', callsign='Bluekiss' WHERE name='ADULT Bluekiss';
 #UPDATE channel SET channum=878, visible=1 WHERE name='Bluekiss';
 #UPDATE channel SET name='Redhot TV', callsign='Redhot TV' WHERE name='ADULT redhotTv';
 #UPDATE channel SET channum=879, visible=1 WHERE name='Redhot TV';
 
 -- Testing;
 UPDATE channel SET name='BBC Sport Interactive', callsign='BBC Sport Interactive' WHERE name='BBC Red Button';
 UPDATE channel SET name='BBC Sport Interactive', callsign='BBC Sport Interactive' WHERE name='BBC Sport Interactive: BBC1';
 UPDATE channel SET channum=900, visible=1, xmltvid="interactive.sport.bbc.co.uk" WHERE name='BBC Sport Interactive';
 UPDATE channel SET name='BBC Sport Interactive: BBC1', callsign='BBC Sport Interactive: BBC1' WHERE name='301';
 UPDATE channel SET name='BBC Sport Interactive: BBC1', callsign='BBC Sport Interactive: BBC1' WHERE name='BBC RB 301';
 UPDATE channel SET channum=901, visible=1, xmltvid="bbc1.interactive.sport.bbc.co.uk" WHERE name='BBC Sport Interactive: BBC1';
 UPDATE channel SET name='BBC Sport Interactive: BBC2', callsign='BBC Sport Interactive: BBC2' WHERE name='302';
 UPDATE channel SET channum=902, visible=1, xmltvid="bbc2.interactive.sport.bbc.co.uk" WHERE name='BBC Sport Interactive: BBC2';
 UPDATE channel SET name='BBC Sport Interactive: BBC3', callsign='BBC Sport Interactive: BBC3' WHERE name='303';
 UPDATE channel SET channum=903, visible=1, xmltvid="bbc3.interactive.sport.bbc.co.uk" WHERE name='BBC Sport Interactive: BBC3';

-- Regions;
-- BBC1, channun 101
 UPDATE channel SET name='BBC One', callsign='BBC One' WHERE name='BBC ONE Scot';
 UPDATE channel SET name='BBC One', callsign='BBC One' WHERE name='BBC 1 Scotland';
 UPDATE channel SET channum=101, visible=1 WHERE name='BBC One'; 

 #UPDATE channel SET name='BBC One', callsign='BBC One' WHERE name='BBC 1 South';
 #UPDATE channel SET name='BBC One', callsign='BBC One' WHERE name='BBC ONE';
 #UPDATE channel SET channum=101, visible=1, xmltvid="south.bbc1.bbc.co.uk" WHERE name='BBC One'; 

 UPDATE channel SET channum=909, visible=1 WHERE name = 'BBC 1 Scotland'; 
 UPDATE channel SET channum=910, visible=1 WHERE name = 'BBC 1 CI';
 UPDATE channel SET channum=911, visible=1 WHERE name = 'BBC 1 E Mids';
 UPDATE channel SET channum=912, visible=1 WHERE name = 'BBC 1 East (E)';
 UPDATE channel SET channum=913, visible=1 WHERE name = 'BBC 1 East (W)';
 UPDATE channel SET channum=914, visible=1 WHERE name = 'BBC 1 London';
 UPDATE channel SET channum=915, visible=1 WHERE name = 'BBC 1 N West';
 UPDATE channel SET channum=916, visible=1 WHERE name = 'BBC 1 NE & C';
 UPDATE channel SET channum=917, visible=1 WHERE name = 'BBC 1 NI';
 UPDATE channel SET channum=918, visible=1 WHERE name = 'BBC 1 Oxford';
 UPDATE channel SET channum=919, visible=1 WHERE name = 'BBC 1 S East';
 UPDATE channel SET channum=920, visible=1 WHERE name = 'BBC 1 S West';
 UPDATE channel SET channum=921, visible=1 WHERE name = 'BBC 1 South';
 UPDATE channel SET channum=922, visible=1 WHERE name = 'BBC 1 W Mids';
 UPDATE channel SET channum=923, visible=1 WHERE name = 'BBC 1 Wales';
 UPDATE channel SET channum=924, visible=1 WHERE name = 'BBC 1 West';
 UPDATE channel SET channum=925, visible=1 WHERE name = 'BBC 1 Yorks';
 UPDATE channel SET channum=926, visible=1 WHERE name = 'BBC 1 Yrks&Lin';
  
-- BBC2, channum 102
 UPDATE channel SET name='BBC Two', callsign='BBC Two' WHERE name='BBC 2 Scotland';
 UPDATE channel SET name='BBC Two', callsign='BBC Two' WHERE name='BBC TWO Scot';
 UPDATE channel SET channum=102, visible=1 WHERE name='BBC Two';
 
 UPDATE channel SET channum=927, visible=1 WHERE name = 'BBC 2 Scotland'; 
 UPDATE channel SET channum=928, visible=1 WHERE name = 'BBC 2 England';
 UPDATE channel SET channum=929, visible=1 WHERE name = 'BBC 2 NI';
 UPDATE channel SET channum=930, visible=1 WHERE name = 'BBC 2 Wales';


-- BBC1 HD, channum 108
 #UPDATE channel SET name='BBC One HD', callsign='BBC One HD' WHERE name='BBC1 HD';
 #UPDATE channel SET channum=108, visible=1, xmltvid="hd.bbc1.bbc.co.uk" WHERE name='BBC One HD';
 UPDATE channel SET name='BBC One HD', callsign='BBC One HD' WHERE name='BBC 1 Scot HD';
 UPDATE channel SET channum=108, visible=1 WHERE name='BBC One HD';

 UPDATE channel SET channum=931, visible=1 WHERE name = 'BBC1 HD';
 UPDATE channel SET channum=932, visible=1 WHERE name = 'BBC 1 NI HD';
 UPDATE channel SET channum=933, visible=1 WHERE name = 'BBC 1 Scot HD';
 UPDATE channel SET channum=934, visible=1 WHERE name = 'BBC 1 Wal HD';
  
 
-- ITV1, channum 103
-- taken from lyngsat & http://www.a516digital.com/2013/04/non-freesat-channel-highlights-channel.html 
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=940, channel.name='ITV London', channel.callsign='ITV London' WHERE channel.serviceid=10060 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10758500 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=941, channel.name='ITV Granada', channel.callsign='ITV Granada' WHERE channel.serviceid=10080 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10758500 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=942, channel.name='ITV Anglia East', channel.callsign='ITV Anglia East' WHERE channel.serviceid=10090 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10758500 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=943, channel.name='ITV Central West', channel.callsign='ITV Central West' WHERE channel.serviceid=10100 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10758500 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=944, channel.name='ITV Wales', channel.callsign='ITV Wales' WHERE channel.serviceid=10020 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10832250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=945, channel.name='ITV West', channel.callsign='ITV West' WHERE channel.serviceid=10030 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10832250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=946, channel.name='ITV Westcountry', channel.callsign='ITV Westcountry' WHERE channel.serviceid=10040 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10832250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=947, channel.name='ITV Border', channel.callsign='ITV Border' WHERE channel.serviceid=10120 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=948, channel.name='ITV Tyne Tees', channel.callsign='ITV Tyne Tees' WHERE channel.serviceid=10130 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=949, channel.name='ITV Meridian South', channel.callsign='ITV Meridian South' WHERE channel.serviceid=10140 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=950, channel.name='ITV Meridian East', channel.callsign='ITV Meridian East' WHERE channel.serviceid=10150 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=951, channel.name='ITV Yorkshire', channel.callsign='ITV Yorkshire' WHERE channel.serviceid=10160 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=952, channel.name='ITV Channel TV', channel.callsign='ITV Channel TV' WHERE channel.serviceid=10200 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10906000 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=953, channel.name='STV North', channel.callsign='STV North' WHERE channel.serviceid=10210 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10906000 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=954, channel.name='STV Central West', channel.callsign='STV Central West' WHERE channel.serviceid=10220 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10906000 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=955, channel.name='STV Central East', channel.callsign='STV Central East' WHERE channel.serviceid=10221 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10906000 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=956, channel.name='UTV', channel.callsign='UTV' WHERE channel.serviceid=10230 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10906000 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=957, channel.name='ITV Meridian North', channel.callsign='ITV Meridian North' WHERE channel.serviceid=12101 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10993750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=958, channel.name='ITV Anglia West', channel.callsign='ITV Anglia West' WHERE channel.serviceid=12110 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10993750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=959, channel.name='ITV Yorkshire East', channel.callsign='ITV Yorkshire East' WHERE channel.serviceid=12120 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10993750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=960, channel.name='ITV Central South West', channel.callsign='ITV Central South West' WHERE channel.serviceid=12140 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10993750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=961, channel.name='ITV Central South', channel.callsign='ITV Central South' WHERE channel.serviceid=20700 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=11052750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=962, channel.name='ITV Central East', channel.callsign='ITV Central East' WHERE channel.serviceid=20701 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=11052750 and dtv_multiplex.fec='5/6';

 UPDATE channel SET name='STV', callsign='STV' WHERE name='STV Central West';
 UPDATE channel SET channum=103, visible=1 WHERE name='STV';
 #UPDATE channel SET name='ITV1', callsign='ITV1' WHERE name='ITV Meridian North';
 #UPDATE channel SET name='ITV1', callsign='ITV1' WHERE name='ITV Meridian South';
 #UPDATE channel SET name='ITV1', callsign='ITV1' WHERE name='ITV Meridian East';
 #UPDATE channel SET name='ITV1', callsign='ITV1' WHERE name='ITV';
 #UPDATE channel SET channum=103, visible=1, xmltvid="meridian.itv1.itv.co.uk"  WHERE name='ITV1';
   
 
-- ITV1 HD, channum 119
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=963, channel.name='ITV London HD', channel.callsign='ITV London HD' WHERE channel.serviceid=10000 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10832250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=963, channel.name='ITV London HD', channel.callsign='ITV London HD' WHERE channel.serviceid=20780 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=11052750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=964, channel.name='ITV Granada HD', channel.callsign='ITV Granada HD' WHERE channel.serviceid=12130 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10993750 and dtv_multiplex.fec='5/6';
 #UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=965, channel.name='STV HD', channel.callsign='STV HD' WHERE channel.serviceid=3855 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=23000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10935500 and dtv_multiplex.fec='8/9';
 #UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=966, channel.name='ITV Meridian S. HD', channel.callsign='ITV Meridian S. HD' WHERE channel.serviceid=3851 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=23000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10935500 and dtv_multiplex.fec='8/9';
 #UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=967, channel.name='ITV Central West HD', channel.callsign='ITV Central West HD' WHERE channel.serviceid=3852 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=23000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10935500 and dtv_multiplex.fec='8/9';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=965, channel.name='STV HD', channel.callsign='STV HD' WHERE channel.serviceid=3855 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=23000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10935500 and dtv_multiplex.fec='2/3';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=966, channel.name='ITV Meridian S. HD', channel.callsign='ITV Meridian S. HD' WHERE channel.serviceid=3851 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=23000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10935500 and dtv_multiplex.fec='2/3';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=967, channel.name='ITV Central West HD', channel.callsign='ITV Central West HD' WHERE channel.serviceid=3852 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=23000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10935500 and dtv_multiplex.fec='2/3';

 UPDATE channel SET channum=119, visible=1 WHERE name='STV HD';
 #UPDATE channel SET name='ITV1 HD', callsign='ITV1 HD' WHERE name='ITV HD';
 #UPDATE channel SET name='ITV1 HD', callsign='ITV1 HD' WHERE name='ITV Meridian S. HD';
 #UPDATE channel SET channum=119, visible=1, xmltvid="meridian.itv1.itv.co.uk" WHERE name='ITV1 HD';
 
 
-- ITV1 +1, channum 140
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=968, channel.name='ITV+1 Meridian SE', channel.callsign='ITV+1 Meridian SE' WHERE channel.serviceid=10101 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10758500 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=969, channel.name='ITV+1 Wales', channel.callsign='ITV+1 Wales' WHERE channel.serviceid=20715 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=11052750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=970, channel.name='ITV+1 Tyne Tees', channel.callsign='ITV+1 Tyne Tees' WHERE channel.serviceid=20735 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=11052750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=971, channel.name='ITV+1 West', channel.callsign='ITV+1 West' WHERE channel.serviceid=20745 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=11052750 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=972, channel.name='ITV+1 Anglia East', channel.callsign='ITV+1 Anglia East' WHERE channel.serviceid=10055 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10832250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=973, channel.name='ITV+1 Central West', channel.callsign='ITV+1 Central West' WHERE channel.serviceid=10145 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=974, channel.name='ITV+1 Westcountry', channel.callsign='ITV+1 Westcountry' WHERE channel.serviceid=10125 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=975, channel.name='ITV+1 London', channel.callsign='ITV+1 London' WHERE channel.serviceid=10155 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10891250 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=976, channel.name='ITV+1 Granada', channel.callsign='ITV+1 Granada' WHERE channel.serviceid=10255 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10906000 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=977, channel.name='ITV+1 Meridian South', channel.callsign='ITV+1 Meridian South' WHERE channel.serviceid=10265 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10906000 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=978, channel.name='STV+1 Central East', channel.callsign='STV+1 Central East' WHERE channel.serviceid=10225 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='v' and dtv_multiplex.frequency=10906000 and dtv_multiplex.fec='5/6';
 UPDATE channel, dtv_multiplex SET channel.visible=1, channel.channum=979, channel.name='ITV+1 Yorkshire', channel.callsign='ITV+1 Yorkshire' WHERE channel.serviceid=12165 and channel.mplexid=dtv_multiplex.mplexid and dtv_multiplex.symbolrate=22000000 and  dtv_multiplex.polarity='h' and dtv_multiplex.frequency=10993750 and dtv_multiplex.fec='5/6';
 
 UPDATE channel SET name='STV +1', callsign='STV +1' WHERE name='STV+1';
 UPDATE channel SET channum=140, visible=1 WHERE name='STV +1';
 #UPDATE channel SET name='ITV1 +1', callsign='ITV1 +1' WHERE name='ITV +1';
 #UPDATE channel SET name='ITV1 +1', callsign='ITV1 +1' WHERE name='ITV+1 Meridian SE';
 #UPDATE channel SET name='ITV1 +1', callsign='ITV1 +1' WHERE name='ITV+1 Meridian South';
 #UPDATE channel SET channum=140, visible=1, xmltvid="tsod.plus-1.itv1.itv.co.uk" WHERE name='ITV1 +1';
 
-- Channel 4
UPDATE channel SET visible=1, channum=968, name='Channel 4 London', callsign='Channel 4 London' WHERE serviceid=9211;
UPDATE channel SET visible=1, channum=969, name='Channel 4 South & East', callsign='Channel 4 SE' WHERE serviceid=9212;
UPDATE channel SET visible=1, channum=970, name='Channel 4 Midlands', callsign='Channel 4 Midlands' WHERE serviceid=9213;
UPDATE channel SET visible=1, channum=971, name='Channel 4 North', callsign='Channel 4 North' WHERE serviceid=9214;
UPDATE channel SET visible=1, channum=972, name='Channel 4 Northern Ireland', callsign='Channel 4 NI' WHERE serviceid=9215;
UPDATE channel SET visible=1, channum=973, name='Channel 4 Scotland', callsign='Channel 4 Scotland' WHERE serviceid=9216;

UPDATE channel SET visible=1, channum=968, name='Channel 4 London +1', callsign='Channel 4 London +1' WHERE serviceid=8311;
UPDATE channel SET visible=1, channum=969, name='Channel 4 South & East +1', callsign='Channel 4 SE +1' WHERE serviceid=8312;
UPDATE channel SET visible=1, channum=970, name='Channel 4 Midlands +1', callsign='Channel 4 Midlands +1' WHERE serviceid=8313;
UPDATE channel SET visible=1, channum=971, name='Channel 4 North +1', callsign='Channel 4 North +1' WHERE serviceid=8314;
UPDATE channel SET visible=1, channum=972, name='Channel 4 Northern Ireland +1', callsign='Channel 4 NI +1' WHERE serviceid=8315;
UPDATE channel SET visible=1, channum=973, name='Channel 4 Scotland +1', callsign='Channel 4 Scotland +1' WHERE serviceid=8316;

UPDATE channel SET name='Channel 4', callsign='Channel 4', channum=104, visible=1 WHERE name='Channel 4 Midlands';
UPDATE channel SET name='Channel 4 +1', callsign='Channel 4 +1', channum=121, visible=1 WHERE name='Channel 4 Midlands +1'; 
 
-- Mark BBC channels as addfree and not requiring commercial flagging.
UPDATE channel SET commmethod=-2 WHERE name LIKE '%BBC%' OR name = 'CBeebies';

-- Set Default Channel to a valid entry
UPDATE settings SET data=(SELECT channum FROM channel WHERE channum > 100 ORDER BY channum ASC LIMIT 1) WHERE value='DefaultTVChannel';

-- Set Smart Channel Changing (instant change on 3rd Digit)
UPDATE settings SET data = 1 WHERE value='SmartChannelChange';

Alternative - bash script SQL generator

An alternative method to using the SQL above is to generate a customised channel list yourself, using the bash scripts provided on http://www.mythbox.co.uk (the latest of which can be found here). The script will produce the SQL to feed straight into mysql, and aims to keep the Freeview numbering, fitting Freesat HD channels around this. Once you've got your list of channels, icons, and mappings between relevant SD and HD channel names, its just a case of updating this whenever the lineup changes, rather than changing the SQL. The usual disclaimers apply, test this first and backup your database.

Another Alternative -- mythupchuk

Another way to maintain your own customised list of channel numbers and names is using the mythupchuk script which is available on github.

This script does it all for you: checking the validity of the file and doing the database updates (so use it with care!).

Custom Channel Config Backup and Restore

These script will restore backed up configuration after a channel rescan. Just run the backup before the scan and run the restore script afterwards.

Custom Channel Configuration Backup and Restore