Difference between revisions of "UK Channel Assignments"

From MythTV Official Wiki
Jump to: navigation, search
m (Combined FreeView and FreeSat HD channel assignment)
(Freesat serviceid for ITV table added for reference)
 
(67 intermediate revisions by 19 users not shown)
Line 1: Line 1:
== Notes ==
+
Prior version of this page with out of date but potentially useful scripts: [https://www.mythtv.org/wiki?title=UK_Channel_Assignments&oldid=64773 UK Channel Assignments page version 64773]
 +
 
 +
== Introduction ==
 +
Channel scans generally result in lists that are unrecognisable by the general public, which probably includes your significant other.  In the UK Freeview, Freesat, Sky etc have fairly well defined channel lists.  The goal of this article is to provide strategies, scripts and ideas on how to build an effective channel list in the UK.  First we present getting the standard EPG lists which a novice will probably want to start with and then move on to getting more stuff.
 +
 
 +
The general strategy used is to move all the channels found in a scan to a very high number starting at 100,000 and setting them all invisible.  Then we run through the list and depending on attributes like name or serviceid move the channel into place with a normal channum in our EPG and set it visible.
 +
 
 +
== General script usage ==
 +
The scripts provided here are SQL scripts which can be ''played'' into the database through the command line.  Once you have done a channel scan then shutdown the mythtv backend.  Backup the database first and then run the desired script against the database.  These scripts can also be copy and pasted directly into the MySQL/MariaDB command line client. 
 +
 
 +
This is an example of connecting to the mythconverg database as the mythtv user.  You will be prompted for a password.  You could instead use the root account or any other account with the rights to the database..
 +
 
 +
$ mysql -u mythtv -p --database mythconverg < sql_script.sql
 +
 
 +
== Standard lists ==
 +
* Freesat: https://www.freesat.co.uk/channels
 +
* Freeview: http://www.dtg.org.uk/industry/dtt_channels.html
 +
 
 +
=== Freesat ===
 +
Status as of 1 Sep 2019
 +
* "Other" channels found by call sign - checked against DB after a scan, needs EPG verification
 +
** I've got two CBS channels showing no guide data
 +
* BBC regions completed
 +
* ITV regions OK but need to provide data for non "West" regions!
 +
* Channel 4 has several sids
 +
* Needs final double check and then moving to maintenance
 +
 
 +
Scan parameters:
 +
{| class="wikitable"
 +
|-
 +
!Parameter!!DVBS!!DVBS2
 +
|-
 +
|Frequency||10,714,000||10,847,000
 +
|-
 +
|Polarity||Horizontal||Vertical
 +
|-
 +
|Symbol Rate||22,000,000||23,000,000
 +
|-
 +
|Mod Sys||DVB-S||DVB-S2
 +
|-
 +
|FEC||5/6||3/4
 +
|-
 +
|Modulation||QPSK||8PSK
 +
|-
 +
|Inversion||Auto||Auto
 +
|-
 +
|Rolloff||0.35||0.35
 +
|}
 +
 
 +
Not all channels transmit 24x7 so depending on when you scan, you may miss say BBC Four.  Scan after 2100 for best results - this is not a hard and fast rule!
 +
 
 +
(Work In Progress) This: https://www.a516digital.com/2014/11/itv-stv-utv-satellite-manual-tuning-frequencies.html seems to give us serviceids for ITV regions.
 +
 
 +
<pre>
 +
-- -----------------------------------------------------------------------------------------------
 +
-- freesat-channels.sql
 +
-- -----------------------------------------------------------------------------------------------
 +
-- References:
 +
-- https://www.freesat.co.uk/channels
 +
-- https://downloads.bbc.co.uk/reception/pdfs/satellitefrequencies.pdf
 +
-- https://en.kingofsat.net/pos-28.2E.php
 +
-- https://en.wikipedia.org/wiki/List_of_free-to-air_channels_at_28%C2%B0E
 +
-- -----------------------------------------------------------------------------------------------
 +
-- Some channels do not transmit 24x7 eg BBC Four and may not appear in a scan
 +
-- see the Freesat channel list for times of availability
 +
-- Callsigns and names may differ so check your channels table for what was actually scanned
 +
--
 +
-- Find some entries in the channel table:
 +
-- SELECT channum,callsign,name,mplexid,serviceid FROM channel WHERE name LIKE '%BBC%';
 +
-- Show all entries in the table, in numeric order:
 +
-- SELECT channum,callsign,name,mplexid,serviceid FROM channel ORDER BY CAST(channum AS unsigned);
 +
-- -----------------------------------------------------------------------------------------------
 +
-- Todo:
 +
-- Verify from "Radio" section onwards against the DB
 +
-- Make more use of serviceid to get regional variants of Channel 4 etc in the correct place
 +
-- Additional channels after "official" list
 +
-- -----------------------------------------------------------------------------------------------
 +
 
 +
-- This is the mythtv database
 +
use mythconverg;
 +
 
 +
-- Move all channels to a high number and hide them
 +
UPDATE channel SET channum = channum+100000, visible=FALSE;
 +
 
 +
-- Move channels into correct Freesat EPG position and set visible
 +
-- Local regional channels are set near the end of this script. 
 +
 
 +
-- Entertainment
 +
update channel SET channum=104, visible=1 WHERE name='Channel 4';
 +
update channel SET channum=105, visible=1 WHERE name='Channel 5 HD';
 +
update channel SET channum=107, visible=1, name='BBC Four HD'    WHERE serviceid='8931';
 +
update channel SET channum=108, visible=1, name='BBC Scotland HD' WHERE serviceid='8924';
 +
update channel SET channum=109, visible=1, name='BBC ALBA'        WHERE serviceid='6423';
 +
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='ITVBe';
 +
update channel SET channum=119, visible=1 WHERE name='ITVBe+1';
 +
update channel SET channum=120, visible=1 WHERE name='S4C HD';
 +
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=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='5USA+1';
 +
update channel SET channum=131, visible=1 WHERE name='5STAR';
 +
update channel SET channum=132, visible=1 WHERE name='Paramount';
 +
update channel SET channum=133, visible=1 WHERE name='5Select';
 +
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 Justice';
 +
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='5Spike';
 +
update channel SET channum=142, visible=1 WHERE name='True Ent';
 +
update channel SET channum=144, visible=1 WHERE name='Pick';
 +
update channel SET channum=145, visible=1 WHERE name='Pick+1';
 +
update channel SET channum=146, visible=1 WHERE name='Challenge';
 +
update channel SET channum=147, visible=1 WHERE name='Challenge+1';
 +
update channel SET channum=148, visible=1 WHERE name='Food Network';
 +
update channel SET channum=149, visible=1 WHERE name='Food Netwrk+1';
 +
update channel SET channum=150, visible=1 WHERE name='DMAX';
 +
update channel SET channum=151, visible=1 WHERE name='DMAX+1';
 +
update channel SET channum=152, visible=1 WHERE name='True Ent+1';
 +
update channel SET channum=154, visible=1 WHERE name='ITV4+1';
 +
update channel SET channum=155, visible=1 WHERE name='PBS America';
 +
update channel SET channum=156, visible=1 WHERE name='YourTV';
 +
update channel SET channum=157, visible=1 WHERE name='Dave';
 +
update channel SET channum=158, visible=1 WHERE name='Drama';
 +
update channel SET channum=159, visible=1 WHERE name='YESTERDAY';
 +
update channel SET channum=160, visible=1 WHERE name='Really';
 +
update channel SET channum=161, visible=1 WHERE name='Showcase';
 +
update channel SET channum=162, visible=1 WHERE name='BLAZE';
 +
update channel SET channum=164, visible=1 WHERE name='Together';
 +
update channel SET channum=165, visible=1 WHERE name='Forces TV';
 +
update channel SET channum=166, visible=1 WHERE name='Home';
 +
update channel SET channum=167, visible=1 WHERE name='QUEST HD';
 +
update channel SET channum=168, visible=1 WHERE name='QUEST+1';
 +
update channel SET channum=169, visible=1 WHERE name='QUest Red';
 +
update channel SET channum=170, visible=1 WHERE name='Quest Red+1';
 +
update channel SET channum=171, visible=1 WHERE name='YANGA!';
 +
update channel SET channum=172, visible=1 WHERE name='QUEST';
 +
update channel SET channum=173, visible=1, name='BBC Four'    WHERE serviceid='6316';
 +
update channel SET channum=174, visible=1, name='BBC Scotland' WHERE serviceid='6420';
 +
update channel SET channum=175, visible=1 WHERE name='Smithsonian HD';
 +
 
 +
-- HD Channels
 +
-- (Defined in numeric order)
 +
 
 +
-- News & Sport
 +
update channel SET channum=200, visible=1, name='BBC NEWS HD'    WHERE serviceid='8921';
 +
update channel SET channum=201, visible=1, name='BBC Parliament' WHERE serviceid='10307';
 +
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=205, visible=1 WHERE name='FRANCE 24 HD';
 +
update channel SET channum=206, visible=1 WHERE name='RT HD';
 +
update channel SET channum=207, visible=1 WHERE name='CNN';
 +
update channel SET channum=208, visible=1 WHERE name='Bloomberg HD';
 +
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='CGTN HD';
 +
update channel SET channum=212, visible=1, name='BBC NEWS' WHERE serviceid='10358';
 +
update channel SET channum=214, visible=1 WHERE name='Arirang TV HD';
 +
update channel SET channum=215, visible=1 WHERE name='TRT World HD';
 +
update channel SET channum=250, visible=1 WHERE name='FrontRunner';
 +
update channel SET channum=252, visible=1 WHERE name='FreeSports HD';
 +
 
 +
-- Movies
 +
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='Sony Movies';
 +
update channel SET channum=303, visible=1 WHERE name='True Movies';
 +
update channel SET channum=304, visible=1 WHERE name='TrueMovies+1';
 +
update channel SET channum=305, visible=1 WHERE name='movies4men';
 +
update channel SET channum=306, visible=1 WHERE name='TalkingPictures';
 +
update channel SET channum=307, visible=1 WHERE name='Retro Movies';
 +
 
 +
-- Music
 +
update channel SET channum=501, visible=1 WHERE name='The Vault';
 +
update channel SET channum=516, visible=1 WHERE name='Spotlight TV';
 +
 
 +
-- Childrens
 +
update channel SET channum=600, visible=1, name='CBBC HD'    WHERE serviceid='6952';
 +
update channel SET channum=601, visible=1, name='CBeebies HD' WHERE serviceid='8932';
 +
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='POP Max';
 +
update channel SET channum=605, visible=1 WHERE name='Tiny Pop';
 +
update channel SET channum=606, visible=1 WHERE name='POP+1';
 +
update channel SET channum=607, visible=1, name='CBBC'    WHERE serviceid='10352';
 +
update channel SET channum=608, visible=1, name='CBeebies' WHERE serviceid='6318';
 +
 
 +
-- Faith
 +
update channel SET channum=690, visible=1 WHERE name='Inspiration TV';
 +
update channel SET channum=691, visible=1 WHERE name='DAYSTAR HD';
 +
update channel SET channum=692, visible=1 WHERE name='revelation';
 +
update channel SET channum=694, visible=1 WHERE name='GOD Channel';
 +
update channel SET channum=695, visible=1 WHERE name='SonLife';
 +
 
 +
--Shopping
 +
update channel SET channum=800, visible=1 WHERE name='QVC';
 +
update channel SET channum=801, visible=1 WHERE name='QVC Beauty';
 +
update channel SET channum=802, visible=1 WHERE name='QVC Extra';
 +
update channel SET channum=803, visible=1 WHERE name='QVC Style';
 +
update channel SET channum=805, visible=1 WHERE name='Gems TV';
 +
update channel SET channum=806, visible=1 WHERE name='JML Direct';
 +
update channel SET channum=807, visible=1 WHERE name='JewelryMaker';
 +
update channel SET channum=809, visible=1 WHERE name='TJC';
 +
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=817, visible=1 WHERE name='Hochanda';
 +
 
 +
-- Radio
 +
update channel SET channum=700, visible=1, name='BBC R1'      WHERE serviceid='6450';
 +
update channel SET channum=701, visible=1, name='BBC R1X'      WHERE serviceid='6466';
 +
update channel SET channum=702, visible=1, name='BBC R2'      WHERE serviceid='6452';
 +
update channel SET channum=703, visible=1, name='BBC R3'      WHERE serviceid='10380';
 +
update channel SET channum=704, visible=1, name='BBC R4'      WHERE serviceid='10381';
 +
update channel SET channum=705, visible=1, name='BBC R5 Live'  WHERE serviceid='6401';
 +
update channel SET channum=706, visible=1, name='BBC R5 Live Sports X' WHERE serviceid='6464';
 +
update channel SET channum=707, visible=1, name='BBC 6 Music'  WHERE serviceid='10383';
 +
update channel SET channum=708, visible=1, name='BBC R4 Extra' WHERE serviceid='10384';
 +
update channel SET channum=709, visible=1, name='BBC Asian'    WHERE serviceid='6460';
 +
update channel SET channum=710, visible=1, name='BBC R4 LW'    WHERE serviceid='10382';
 +
update channel SET channum=711, visible=1, name='BBC World Service' WHERE serviceid='10385';
 +
update channel SET channum=712, visible=1, name='BBC R Scot'  WHERE serviceid='10386';
 +
update channel SET channum=713, visible=1, name='BBC R n Gael' WHERE serviceid='10387';
 +
update channel SET channum=714, visible=1, name='BBC R Wales'  WHERE serviceid='10388';
 +
update channel SET channum=715, visible=1, name='BBC R Cymru'  WHERE serviceid='10389';
 +
update channel SET channum=716, visible=1, name='BBC R Ulster' WHERE serviceid='10390';
 +
update channel SET channum=716, visible=1, name='BBC R Foyle'  WHERE serviceid='10391';
 +
update channel SET channum=718, visible=1, name='BBC London'  WHERE serviceid='6470';
 +
update channel SET channum=719, visible=1 WHERE name='Capital FM';
 +
update channel SET channum=720, visible=1 WHERE name='Capital Xtra';
 +
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=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=734, visible=1 WHERE name='LBC 97.3';
 +
update channel SET channum=735, visible=1, name='BBC R Cymru 2' WHERE serviceid='6454';
 +
update channel SET channum=736, visible=1 WHERE name='Virgn Radio UK';
 +
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=786, visible=1 WHERE name='BFBS Radio';
 +
update channel SET channum=790, visible=1 WHERE name='TWR';
 +
 
 +
-- Regional Channels (set your local choices further on in this script)
 +
-- BBC One - Channel 101
 +
update channel SET channum=950, visible=1, name='BBC 1 London'  WHERE serviceid='6301';
 +
update channel SET channum=951, visible=1, name='BBC 1 CI'      WHERE serviceid='6361';
 +
update channel SET channum=952, visible=1, name='BBC 1 E Mids'  WHERE serviceid='10305';
 +
update channel SET channum=953, visible=1, name='BBC 1 East (E)' WHERE serviceid='10306';
 +
update channel SET channum=954, visible=1, name='BBC 1 East (W)' WHERE serviceid='6351';
 +
update channel SET channum=955, visible=1, name='BBC 1 N West'  WHERE serviceid='6441';
 +
update channel SET channum=956, visible=1, name='BBC 1 NE & C'  WHERE serviceid='6471';
 +
update channel SET channum=957, visible=1, name='BBC 1 NI'      WHERE serviceid='10361';
 +
update channel SET channum=958, visible=1, name='BBC 1 Oxford'  WHERE serviceid='10356';
 +
update channel SET channum=959, visible=1, name='BBC 1 S East'  WHERE serviceid='6461';
 +
update channel SET channum=960, visible=1, name='BBC 1 Scotland' WHERE serviceid='6421';
 +
update channel SET channum=961, visible=1, name='BBC 1 South'    WHERE serviceid='10353';
 +
update channel SET channum=962, visible=1, name='BBC 1 S West'  WHERE serviceid='10354';
 +
update channel SET channum=963, visible=1, name='BBC 1 W Mids'  WHERE serviceid='10301';
 +
update channel SET channum=964, visible=1, name='BBC 1 Wales'    WHERE serviceid='10311';
 +
update channel SET channum=965, visible=1, name='BBC 1 West'    WHERE serviceid='6341';
 +
update channel SET channum=966, visible=1, name='BBC 1 Yorks'    WHERE serviceid='6451';
 +
update channel SET channum=967, visible=1, name='BBC 1 Yrks&Lin' WHERE serviceid='10303';
 +
 
 +
-- BBC One HD - Channel 106
 +
update channel SET channum=972, visible=1, name='BBC One HD'          WHERE serviceid='6941';
 +
update channel SET channum=973, visible=1, name='BBC One Scotland HD' WHERE serviceid='8901';
 +
update channel SET channum=976, visible=1, name='BBC One Wales HD'    WHERE serviceid='8911';
 +
update channel SET channum=978, visible=1, name='BBC One NI HD'      WHERE serviceid='6943';
 +
 
 +
-- BBC Two - Channel 110
 +
update channel SET channum=968, visible=1, name='BBC 2 England' WHERE serviceid='6302';
 +
update channel SET channum=969, visible=1, name='BBC 2 NI'      WHERE serviceid='10362';
 +
-- Regional Doc unclear, so keeping HD channel
 +
-- update channel SET channum=971, visible=1, name='BBC 2 Wales'  WHERE serviceid='10312';
  
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.
+
-- BBC Two HD - Channel 102/106 ??
 +
update channel SET channum=949, visible=1, name='BBC Two HD'      WHERE serviceid='6940';
 +
update channel SET channum=971, visible=1, name='BBC Two Wales HD' WHERE serviceid='6912';
  
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.
+
-- ===============================================================================================
 +
-- Set your local regional channels here
 +
-- ===============================================================================================
 +
-- BBC
 +
update channel SET channum=101, visible=1, name='BBC One'    WHERE serviceid='6341';
 +
update channel SET channum=102, visible=1, name='BBC Two HD' WHERE serviceid='6940';
 +
update channel SET channum=106, visible=1, name='BBC One HD' WHERE serviceid='6941';
 +
update channel SET channum=110, visible=1, name='BBC Two'    WHERE serviceid='6302';
  
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 [[http://www.mythtv.org/wiki/Uk_xmltv]].
+
-- ITV
 +
-- These are not all displayed on a standard Freesat list, unlike BBC you only get your region.
 +
-- The callsign and name are all set to ITV or similar. Only the serviceid is an indicator
 +
-- There is nothing to stop you putting the lot in your EPG at the end like the BBC channels
 +
-- You need to set your serviceids here - these are for "West"
 +
update channel SET channum=103, visible=1, name='ITV'    WHERE serviceid='12170';
 +
update channel SET channum=111, visible=1, name='ITV HD' WHERE serviceid='20770';
 +
update channel SET channum=112, visible=1, name='ITV+1'  WHERE serviceid='10125';
  
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.
+
-- End of regional channels
 +
-- ===============================================================================================
  
Remember to change the script for your ITV1 regional variation.
+
-- Channel fixups -------------------------------------------------
 +
-- CBS Reality has two sids 55214 and 51216
 +
update channel SET visible=0 WHERE serviceid='55214';
 +
-- Sky News has two sids 4704 and 4706
 +
update channel SET visible=0 WHERE serviceid='4706';
 +
-- Channel fixups -------------------------------------------------
  
 +
-- Mark BBC channels as advert free and not requiring commercial flagging.
 +
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
+
-- Set Default Channel to the first entry
 +
UPDATE settings SET data=(SELECT channum FROM channel WHERE channum > 100 ORDER BY CAST(channum AS unsigned) ASC LIMIT 1) WHERE value='DefaultTVChannel';
  
See also [[Database_editing_script]] where a template script is provided for other territories.
+
-- Set Smart Channel Changing (instant change on 3rd Digit)
 +
UPDATE settings SET data = 1 WHERE value='SmartChannelChange';
 +
</pre>
  
 
=== Freeview ===
 
=== Freeview ===
  
use mythconverg;
 
update channel set channum=1 where name='BBC ONE';
 
update channel set channum=2 where name='BBC TWO';
 
update channel set channum=3 where name='ITV1';
 
update channel set channum=4 where name='Channel 4';
 
update channel set channum=5 where name='Five';
 
update channel set channum=6 where name='ITV2';
 
update channel set channum=7 where name='BBC THREE';
 
update channel set channum=9 where name='BBC FOUR';
 
update channel set channum=10 where name='ITV3';
 
update channel set channum=11 where name='SKY THREE';
 
update channel set channum=12 where name='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='Virgin1';
 
update channel set channum=21 where name='TMF';
 
update channel set channum=22 where name='Ideal World';
 
update channel set channum=23 where name='bid tv';
 
update channel set channum=24 where name='ITV4';
 
update channel set channum=25 where name='Dave ja vu';
 
update channel set channum=26 where name='UKTV STYLE';
 
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='FIVER';
 
update channel set channum=31 where name='FIVE USA';
 
update channel set channum=34 where name='SETANTA SPORTS';
 
update channel set channum=35 where name='Virgin1+1';
 
update channel set channum=37 where name='smileTV';
 
update channel set channum=38 where name='TOPUP Anytime1';
 
update channel set channum=39 where name='TOPUP Anytime2';
 
update channel set channum=40 where name='TOPUP Anytime3';
 
update channel set channum=41 where name='TOPUP Anytime4';
 
update channel set channum=42 where name='Nuts TV';
 
update channel set channum=43 where name='Gems TV';
 
update channel set channum=44 where name='GEMSTV1';
 
update channel set channum=45 where name='Lottery Xtra';
 
update channel set channum=46 where name='smileTV2';
 
update channel set channum=47 where name='QUEST';
 
update channel set channum=48 where name='SuperCasino';
 
update channel set channum=49 where name='NETPLAY TV';
 
update channel set channum=50 where name='PARTYLAND';
 
update channel set channum=70 where name='CBBC Channel';
 
update channel set channum=71 where name='CBeebies';
 
update channel set channum=75 where name='CITV';
 
update channel set channum=80 where name='BBC NEWS';
 
update channel set channum=81 where name='BBC Parliament';
 
update channel set channum=82 where name='Sky News';
 
update channel set channum=83 where name='Sky Spts News';
 
update channel set channum=84 where name='CNN';
 
update channel set channum=87 where name='Community';
 
update channel set channum=88 where name='Teachers TV';
 
update channel set channum=97 where name='Television X';
 
update channel set channum=100 where name='Teletext';
 
update channel set channum=101 where name='Ttext Holidays';
 
update channel set channum=102 where name='Rabbit';
 
update channel set channum=103 where name='TeletextCasino';
 
update channel set channum=104 where name='1-2-1 Dating';
 
update channel set channum=105 where name='BBC Red Button';
 
update channel set channum=106 where name='Directgov';
 
update channel set channum=108 where name='Sky Text';
 
update channel set channum=300 where name='4TVinteractive';
 
update channel set channum=301 where name='301';
 
update channel set channum=302 where name='302';
 
update channel set channum=303 where name='303';
 
update channel set channum=305 where name='305';
 
update channel set channum=700 where name='BBC Radio 1';
 
update channel set channum=701 where name='BBC 1Xtra';
 
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 7';
 
update channel set channum=709 where name='BBC Asian Net.';
 
update channel set channum=710 where name='BBC World Sv.';
 
update channel set channum=711 where name='The Hits Radio';
 
update channel set channum=712 where name='Smash Hits!';
 
update channel set channum=713 where name='Kiss';
 
update channel set channum=714 where name='heat';
 
update channel set channum=715 where name='Magic';
 
update channel set channum=716 where name='Q';
 
update channel set channum=718 where name='SMOOTH RADIO';
 
update channel set channum=721 where name='MOJO';
 
update channel set channum=722 where name='Kerrang!';
 
update channel set channum=723 where name='talkSPORT';
 
update channel set channum=725 where name='Premier Radio';
 
update channel set channum=727 where name='Absolute Radio';
 
update channel set channum=728 where name='Heart';
 
  
=== FreeSat ===
+
== Custom or combined lists ==
 +
 
 +
 
 +
 
 +
== Notes ==
  
 +
ITV channel serviceids for Freesat at 1 Sep 2019.  Remove this when a better source is found.
  
  use mythconverg;
+
{| class="wikitable"
  update channel SET channum=1 WHERE name='BBC 1 South';
+
|+ITV
update channel SET channum=2 WHERE name='BBC 2 England';
+
|Channel
update channel SET channum=3 WHERE name='ITV1 Meridian S';
+
|serviceid
update channel SET channum=4 WHERE name='Channel 4';
+
|-
update channel SET channum=5 WHERE name='Five';
+
|ITV2 HD (pay TV)
update channel SET channum=6 WHERE name='BBC THREE';
+
|20710
update channel SET channum=7 WHERE name='BBC FOUR';
+
|-
update channel SET channum=8 WHERE name='ITV2';
+
|ITV Wales HD
update channel SET channum=9 WHERE name='ITV4';
+
|20730
update channel SET channum=10 WHERE name='E4';
+
|-
update channel SET channum=11 WHERE name='More4';
+
|ITV Granada HD
update channel SET channum=12 WHERE name='e4';
+
|20740
update channel SET channum=13 WHERE name='ITV2+1';
+
|-
update channel SET channum=14 WHERE name='Channel 4 +1';
+
|ITV Tyne Tees HD
update channel SET channum=15 WHERE name='More4 +1';
+
|20750
update channel SET channum=16 WHERE name='EMTV';
+
|-
update channel SET channum=17 WHERE name='E4+1';
+
|ITV South West HD ^
update channel SET channum=18 WHERE name='Men & Motors';
+
|20760
update channel SET channum=19 WHERE name='Nuts TV';
+
|-
update channel SET channum=20 WHERE name='Nuts TV +1';
+
|ITV West HD ^
update channel SET channum=21 WHERE name='Fight Network';
+
|20770
update channel SET channum=25 WHERE name='CBBC Channel';
+
|-
update channel SET channum=26 WHERE name='CBeebies';
+
|STV Central West HD
update channel SET channum=27 WHERE name='CITV';
+
|20800
update channel SET channum=28 WHERE name='Tiny Pop';
+
|-
update channel SET channum=29 WHERE name='POP';
+
|UTV HD
update channel SET channum=30 WHERE name='Tiny Pop +1';
+
|20810
update channel SET channum=31 WHERE name='PopGirl';
+
|-
update channel SET channum=32 WHERE name='PopGirl +1';
+
|ITV Box Office HD(pay)
update channel SET channum=33 WHERE name='Kix!';
+
|20825
update channel SET channum=35 WHERE name='Film4';
+
|-
update channel SET channum=36 WHERE name='Film4 +1';
+
|ITV Anglia E HD
update channel SET channum=37 WHERE name='True Movies';
+
|20840
update channel SET channum=38 WHERE name='True Movies 2';
+
|-
update channel SET channum=39 WHERE name='movies4men';
+
|ITV Border England HD
update channel SET channum=40 WHERE name='movies4men 2';
+
|20850
update channel SET channum=41 WHERE name='mov4men+1';
+
|-
update channel SET channum=42 WHERE name='mov4men2 +1';
+
|ITV London HD
update channel SET channum=43 WHERE name='AIT Movistar';
+
|21000
update channel SET channum=44 WHERE name='World Movies';
+
|-
update channel SET channum=45 WHERE name='Movies Active';
+
|ITV Meridian SE HD
update channel SET channum=46 WHERE name='Film DAL';
+
|21020
update channel SET channum=47 WHERE name='Film24';
+
|-
update channel SET channum=50 WHERE name='BBC NEWS';
+
|ITV Central West HD
update channel SET channum=51 WHERE name='BBC PARL\'MNT';
+
|21030
update channel SET channum=52 WHERE name='Sky News';
+
|-
update channel SET channum=53 WHERE name='ATN';
+
|ITV Yorks W HD
update channel SET channum=54 WHERE name='sportsXchange';
+
|21040
update channel SET channum=55 WHERE name='CNN';
+
|-
update channel SET channum=56 WHERE name='EuroNews';
+
|ITV 3 HD  (pay TV)
update channel SET channum=57 WHERE name='France 24';
+
|21050
update channel SET channum=58 WHERE name='Channel S NTV';
+
|-
update channel SET channum=59 WHERE name='CCTV-9';
+
|ITV 4 HD  (pay TV)
update channel SET channum=60 WHERE name='PCNE Chinese';
+
|21060
update channel SET channum=61 WHERE name='Russia Today';
+
|-
update channel SET channum=65 WHERE name='BBC R1';
+
|ITV London
update channel SET channum=66 WHERE name='BBC R2';
+
|10060
update channel SET channum=67 WHERE name='BBC R3';
+
|-
update channel SET channum=68 WHERE name='BBC R4 FM';
+
|ITV Granada
update channel SET channum=69 WHERE name='BBC R5L';
+
|10080
update channel SET channum=70 WHERE name='BBC 6 Music';
+
|-
update channel SET channum=71 WHERE name='BBC Radio 7';
+
|ITV Anglia East
update channel SET channum=75 WHERE name='BBC HD';
+
|10090
 +
|-
 +
|ITV+1 Anglia East
 +
|10091
 +
|-
 +
|ITV Central West
 +
|10100
 +
|-
 +
|ITV+1 Meridian SE
 +
|10101
 +
|-
 +
|ITV2
 +
|10070
 +
|-
 +
|CITV
 +
|10071
 +
|-
 +
|ITV4
 +
|10072
 +
|-
 +
|ITV4+1
 +
|10073
 +
|-
 +
|ITVBe
 +
|10075
 +
|-
 +
|ITV Border (Engl.)
 +
|10120
 +
|-
 +
|ITV+1 West^
 +
|10125
 +
|-
 +
|ITV Tyne Tees
 +
|10130
 +
|-
 +
|ITV Meridian South
 +
|10140
 +
|-
 +
|ITV+1 Central West
 +
|10145
 +
|-
 +
|ITV Meridian SE
 +
|10150
 +
|-
 +
|ITV+1 London
 +
|10155
 +
|-
 +
|ITV Yorkshire West
 +
|10160
 +
|-
 +
|ITVBe+1
 +
|10139
 +
|-
 +
|ITV2+1
 +
|10165
 +
|-
 +
|ITV Channel Television
 +
|10200
 +
|-
 +
|STV North (Aberdeen)
 +
|10210
 +
|-
 +
|STV Central West (Glas)
 +
|10220
 +
|-
 +
|STV Central East (Edin)
 +
|10221
 +
|-
 +
|STV North (Dundee)
 +
|10225
 +
|-
 +
|UTV
 +
|10230
 +
|-
 +
|UTV+1
 +
|10231
 +
|-
 +
|ITV South West^
 +
|10240
 +
|-
 +
|ITV+1 Granada
 +
|10255
 +
|-
 +
|ITV3
 +
|10260
 +
|-
 +
|ITV3+1
 +
|10261
 +
|-
 +
|ITV Meridian Thames V.
 +
|12101
 +
|-
 +
|ITV+1 Tyne Tees
 +
|12105
 +
|-
 +
|ITV Anglia West
 +
|12110
 +
|-
 +
|ITV Yorkshire East
 +
|12120
 +
|-
 +
|ITV Border (Scotland)
 +
|12130
 +
|-
 +
|ITV Central East
 +
|12145
 +
|-
 +
|ITV Wales
 +
|12150
 +
|-
 +
|ITV+1 Wales
 +
|12155
 +
|-
 +
|ITV+1 Yorkshire
 +
|12165
 +
|-
 +
|ITV West^
 +
|12170
 +
|-
 +
|ITV+1 South West^
 +
|12175
 +
|}
  
  
=== Combined FreeView and FreeSat HD channel assignment ===
 
  
<code>
+
[[Custom Channel Configuration Backup and Restore]]
-- Script to update channel numbers in a combined Freeview & Freesat system in
+
[[Category:United Kingdom|Channel assignments]]
-- the UK.
 
-- This script is based on and inspired by the work of Stephen Robertson
 
-- posted by himself on the mythtv-users mailing list: users@mythtv.org
 
-- for access to the mailing list see http://www.mythtv.org/support
 
 
-- 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 -pEquin0x mythconverg.channel > 20101128-channel.sql
 
-- to restore the backup:
 
-- mysql -uroot -p --database mythconverg < 20101128-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.
 
 
-- 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.
 
 
-- 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;
 
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 name='BBC Two', callsign='BBC Two' WHERE name='BBC 2 England';
 
UPDATE channel SET name='BBC Two', callsign='BBC Two' WHERE name='BBC TWO';
 
UPDATE channel SET channum=102, visible=1, xmltvid="south.bbc2.bbc.co.uk" WHERE name='BBC Two';
 
UPDATE channel SET name='ITV1', callsign='ITV1' WHERE name='ITV1 Meridian S';
 
UPDATE channel SET channum=103, visible=1, xmltvid="meridian.itv1.itv.co.uk"  WHERE name='ITV1';
 
UPDATE channel SET channum=104, visible=1, xmltvid="channel4.com" WHERE name='Channel 4';
 
UPDATE channel SET channum=105, visible=1, xmltvid="channel5.co.uk" WHERE name='Five';
 
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';
 
UPDATE channel SET channum=108, visible=1, xmltvid="hd.bbc.co.uk" WHERE name='BBC HD';
 
UPDATE channel SET name='BBC One HD', callsign='BBC One HD' WHERE name='BBC1 HD';
 
UPDATE channel SET channum=109, visible=1, xmltvid="hd.bbc1.bbc.co.uk" WHERE name='BBC One 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';
 
UPDATE channel SET channum=119, visible=1, xmltvid="itv4.itv.co.uk" WHERE name='ITV1 HD';
 
#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 channum=121, visible=1, xmltvid="tsod.plus-1.channel4.com" WHERE name='Channel 4 +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, xmltvid="freeview.1.virginmedia.com" WHERE name='Channel One';
 
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="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='Fiver';
 
UPDATE channel SET channum=133, visible=1, xmltvid="fiveusa.channel5.co.uk" WHERE name='Five 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';
 
 
-- News and Sport
 
UPDATE channel SET channum=200, visible=1, xmltvid="news.bbc.co.uk" WHERE name='BBC News';
 
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=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 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';
 
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 2 +1', callsign='Movies4Men 2 +1' WHERE name='mov4men2 +1';
 
UPDATE channel SET channum=307, visible=1, xmltvid="tsod.plus-1.2.movies4men.co.uk" WHERE name='Movies4Men 2 +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 channum=406, visible=1, xmltvid="tsod.plus-1.foodnetwork.com" WHERE name='Food Netwrk +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=515, visible=1 WHERE name='NME 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';
 
 
-- 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=607, visible=1 WHERE name='PopGirl +1';
 
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 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 channum=701, visible=1 WHERE name='BBC Radio 1Xtra';
 
UPDATE channel SET channum=702, visible=1 WHERE name='BBC Radio 2';
 
UPDATE channel SET channum=703, visible=1 WHERE name='BBC Radio 3';
 
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 channum=709, visible=1 WHERE name='BBC Asian Network';
 
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 World Sv.';
 
UPDATE channel SET channum=711, visible=1 WHERE name='BBC World Service';
 
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';
 
 
-- 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 channum=900, 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 channum=901, xmltvid="bbc1.interactive.sport.bbc.co.uk" WHERE name='301';
 
UPDATE channel SET name='BBC Sport Interactive: BBC2', callsign='BBC Sport Interactive: BBC2' WHERE name='302';
 
UPDATE channel SET channum=902, 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, xmltvid="bbc3.interactive.sport.bbc.co.uk" WHERE name='BBC Sport Interactive: BBC3';
 
UPDATE channel SET channum=904 WHERE name='Home';
 
 
-- Mark BBC channals as addfree and not requiring commercial flagging.
 
UPDATE channel set commmethod=-2 WHERE name LIKE '%BBC%' OR name = 'CBeebies';
 
</code>
 

Latest revision as of 00:05, 2 September 2019

Prior version of this page with out of date but potentially useful scripts: UK Channel Assignments page version 64773

Introduction

Channel scans generally result in lists that are unrecognisable by the general public, which probably includes your significant other. In the UK Freeview, Freesat, Sky etc have fairly well defined channel lists. The goal of this article is to provide strategies, scripts and ideas on how to build an effective channel list in the UK. First we present getting the standard EPG lists which a novice will probably want to start with and then move on to getting more stuff.

The general strategy used is to move all the channels found in a scan to a very high number starting at 100,000 and setting them all invisible. Then we run through the list and depending on attributes like name or serviceid move the channel into place with a normal channum in our EPG and set it visible.

General script usage

The scripts provided here are SQL scripts which can be played into the database through the command line. Once you have done a channel scan then shutdown the mythtv backend. Backup the database first and then run the desired script against the database. These scripts can also be copy and pasted directly into the MySQL/MariaDB command line client.

This is an example of connecting to the mythconverg database as the mythtv user. You will be prompted for a password. You could instead use the root account or any other account with the rights to the database..

$ mysql -u mythtv -p --database mythconverg < sql_script.sql 

Standard lists

Freesat

Status as of 1 Sep 2019

  • "Other" channels found by call sign - checked against DB after a scan, needs EPG verification
    • I've got two CBS channels showing no guide data
  • BBC regions completed
  • ITV regions OK but need to provide data for non "West" regions!
  • Channel 4 has several sids
  • Needs final double check and then moving to maintenance

Scan parameters:

Parameter DVBS DVBS2
Frequency 10,714,000 10,847,000
Polarity Horizontal Vertical
Symbol Rate 22,000,000 23,000,000
Mod Sys DVB-S DVB-S2
FEC 5/6 3/4
Modulation QPSK 8PSK
Inversion Auto Auto
Rolloff 0.35 0.35

Not all channels transmit 24x7 so depending on when you scan, you may miss say BBC Four. Scan after 2100 for best results - this is not a hard and fast rule!

(Work In Progress) This: https://www.a516digital.com/2014/11/itv-stv-utv-satellite-manual-tuning-frequencies.html seems to give us serviceids for ITV regions.

-- -----------------------------------------------------------------------------------------------
-- freesat-channels.sql
-- -----------------------------------------------------------------------------------------------
-- References:
-- https://www.freesat.co.uk/channels
-- https://downloads.bbc.co.uk/reception/pdfs/satellitefrequencies.pdf
-- https://en.kingofsat.net/pos-28.2E.php
-- https://en.wikipedia.org/wiki/List_of_free-to-air_channels_at_28%C2%B0E
-- -----------------------------------------------------------------------------------------------
-- Some channels do not transmit 24x7 eg BBC Four and may not appear in a scan
-- see the Freesat channel list for times of availability
-- Callsigns and names may differ so check your channels table for what was actually scanned
--
-- Find some entries in the channel table:
-- SELECT channum,callsign,name,mplexid,serviceid FROM channel WHERE name LIKE '%BBC%';
-- Show all entries in the table, in numeric order:
-- SELECT channum,callsign,name,mplexid,serviceid FROM channel ORDER BY CAST(channum AS unsigned);
-- -----------------------------------------------------------------------------------------------
-- Todo:
-- Verify from "Radio" section onwards against the DB
-- Make more use of serviceid to get regional variants of Channel 4 etc in the correct place
-- Additional channels after "official" list
-- -----------------------------------------------------------------------------------------------

-- This is the mythtv database
use mythconverg;

-- Move all channels to a high number and hide them
UPDATE channel SET channum = channum+100000, visible=FALSE;

-- Move channels into correct Freesat EPG position and set visible
-- Local regional channels are set near the end of this script.  

-- Entertainment
update channel SET channum=104, visible=1 WHERE name='Channel 4';
update channel SET channum=105, visible=1 WHERE name='Channel 5 HD';
update channel SET channum=107, visible=1, name='BBC Four HD'     WHERE serviceid='8931';
update channel SET channum=108, visible=1, name='BBC Scotland HD' WHERE serviceid='8924';
update channel SET channum=109, visible=1, name='BBC ALBA'        WHERE serviceid='6423';
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='ITVBe';
update channel SET channum=119, visible=1 WHERE name='ITVBe+1';
update channel SET channum=120, visible=1 WHERE name='S4C HD';
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=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='5USA+1';
update channel SET channum=131, visible=1 WHERE name='5STAR';
update channel SET channum=132, visible=1 WHERE name='Paramount';
update channel SET channum=133, visible=1 WHERE name='5Select';
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 Justice';
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='5Spike';
update channel SET channum=142, visible=1 WHERE name='True Ent';
update channel SET channum=144, visible=1 WHERE name='Pick';
update channel SET channum=145, visible=1 WHERE name='Pick+1';
update channel SET channum=146, visible=1 WHERE name='Challenge';
update channel SET channum=147, visible=1 WHERE name='Challenge+1';
update channel SET channum=148, visible=1 WHERE name='Food Network';
update channel SET channum=149, visible=1 WHERE name='Food Netwrk+1';
update channel SET channum=150, visible=1 WHERE name='DMAX';
update channel SET channum=151, visible=1 WHERE name='DMAX+1';
update channel SET channum=152, visible=1 WHERE name='True Ent+1';
update channel SET channum=154, visible=1 WHERE name='ITV4+1';
update channel SET channum=155, visible=1 WHERE name='PBS America';
update channel SET channum=156, visible=1 WHERE name='YourTV';
update channel SET channum=157, visible=1 WHERE name='Dave';
update channel SET channum=158, visible=1 WHERE name='Drama';
update channel SET channum=159, visible=1 WHERE name='YESTERDAY';
update channel SET channum=160, visible=1 WHERE name='Really';
update channel SET channum=161, visible=1 WHERE name='Showcase';
update channel SET channum=162, visible=1 WHERE name='BLAZE';
update channel SET channum=164, visible=1 WHERE name='Together';
update channel SET channum=165, visible=1 WHERE name='Forces TV';
update channel SET channum=166, visible=1 WHERE name='Home';
update channel SET channum=167, visible=1 WHERE name='QUEST HD';
update channel SET channum=168, visible=1 WHERE name='QUEST+1';
update channel SET channum=169, visible=1 WHERE name='QUest Red';
update channel SET channum=170, visible=1 WHERE name='Quest Red+1';
update channel SET channum=171, visible=1 WHERE name='YANGA!';
update channel SET channum=172, visible=1 WHERE name='QUEST';
update channel SET channum=173, visible=1, name='BBC Four'     WHERE serviceid='6316';
update channel SET channum=174, visible=1, name='BBC Scotland' WHERE serviceid='6420';
update channel SET channum=175, visible=1 WHERE name='Smithsonian HD';

-- HD Channels 
-- (Defined in numeric order)

-- News & Sport
update channel SET channum=200, visible=1, name='BBC NEWS HD'    WHERE serviceid='8921';
update channel SET channum=201, visible=1, name='BBC Parliament' WHERE serviceid='10307';
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=205, visible=1 WHERE name='FRANCE 24 HD';
update channel SET channum=206, visible=1 WHERE name='RT HD';
update channel SET channum=207, visible=1 WHERE name='CNN';
update channel SET channum=208, visible=1 WHERE name='Bloomberg HD';
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='CGTN HD';
update channel SET channum=212, visible=1, name='BBC NEWS' WHERE serviceid='10358';
update channel SET channum=214, visible=1 WHERE name='Arirang TV HD';
update channel SET channum=215, visible=1 WHERE name='TRT World HD';
update channel SET channum=250, visible=1 WHERE name='FrontRunner';
update channel SET channum=252, visible=1 WHERE name='FreeSports HD';

-- Movies
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='Sony Movies';
update channel SET channum=303, visible=1 WHERE name='True Movies';
update channel SET channum=304, visible=1 WHERE name='TrueMovies+1';
update channel SET channum=305, visible=1 WHERE name='movies4men';
update channel SET channum=306, visible=1 WHERE name='TalkingPictures';
update channel SET channum=307, visible=1 WHERE name='Retro Movies';

-- Music
update channel SET channum=501, visible=1 WHERE name='The Vault';
update channel SET channum=516, visible=1 WHERE name='Spotlight TV';

-- Childrens
update channel SET channum=600, visible=1, name='CBBC HD'     WHERE serviceid='6952';
update channel SET channum=601, visible=1, name='CBeebies HD' WHERE serviceid='8932';
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='POP Max';
update channel SET channum=605, visible=1 WHERE name='Tiny Pop';
update channel SET channum=606, visible=1 WHERE name='POP+1';
update channel SET channum=607, visible=1, name='CBBC'     WHERE serviceid='10352';
update channel SET channum=608, visible=1, name='CBeebies' WHERE serviceid='6318';

-- Faith
update channel SET channum=690, visible=1 WHERE name='Inspiration TV';
update channel SET channum=691, visible=1 WHERE name='DAYSTAR HD';
update channel SET channum=692, visible=1 WHERE name='revelation';
update channel SET channum=694, visible=1 WHERE name='GOD Channel';
update channel SET channum=695, visible=1 WHERE name='SonLife';

--Shopping
update channel SET channum=800, visible=1 WHERE name='QVC';
update channel SET channum=801, visible=1 WHERE name='QVC Beauty';
update channel SET channum=802, visible=1 WHERE name='QVC Extra';
update channel SET channum=803, visible=1 WHERE name='QVC Style';
update channel SET channum=805, visible=1 WHERE name='Gems TV';
update channel SET channum=806, visible=1 WHERE name='JML Direct';
update channel SET channum=807, visible=1 WHERE name='JewelryMaker';
update channel SET channum=809, visible=1 WHERE name='TJC';
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=817, visible=1 WHERE name='Hochanda';

-- Radio
update channel SET channum=700, visible=1, name='BBC R1'       WHERE serviceid='6450';
update channel SET channum=701, visible=1, name='BBC R1X'      WHERE serviceid='6466';
update channel SET channum=702, visible=1, name='BBC R2'       WHERE serviceid='6452';
update channel SET channum=703, visible=1, name='BBC R3'       WHERE serviceid='10380';
update channel SET channum=704, visible=1, name='BBC R4'       WHERE serviceid='10381';
update channel SET channum=705, visible=1, name='BBC R5 Live'  WHERE serviceid='6401';
update channel SET channum=706, visible=1, name='BBC R5 Live Sports X' WHERE serviceid='6464';
update channel SET channum=707, visible=1, name='BBC 6 Music'  WHERE serviceid='10383';
update channel SET channum=708, visible=1, name='BBC R4 Extra' WHERE serviceid='10384';
update channel SET channum=709, visible=1, name='BBC Asian'    WHERE serviceid='6460';
update channel SET channum=710, visible=1, name='BBC R4 LW'    WHERE serviceid='10382';
update channel SET channum=711, visible=1, name='BBC World Service' WHERE serviceid='10385';
update channel SET channum=712, visible=1, name='BBC R Scot'   WHERE serviceid='10386';
update channel SET channum=713, visible=1, name='BBC R n Gael' WHERE serviceid='10387';
update channel SET channum=714, visible=1, name='BBC R Wales'  WHERE serviceid='10388';
update channel SET channum=715, visible=1, name='BBC R Cymru'  WHERE serviceid='10389';
update channel SET channum=716, visible=1, name='BBC R Ulster' WHERE serviceid='10390';
update channel SET channum=716, visible=1, name='BBC R Foyle'  WHERE serviceid='10391';
update channel SET channum=718, visible=1, name='BBC London'   WHERE serviceid='6470';
update channel SET channum=719, visible=1 WHERE name='Capital FM';
update channel SET channum=720, visible=1 WHERE name='Capital Xtra';
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=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=734, visible=1 WHERE name='LBC 97.3';
update channel SET channum=735, visible=1, name='BBC R Cymru 2' WHERE serviceid='6454';
update channel SET channum=736, visible=1 WHERE name='Virgn Radio UK';
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=786, visible=1 WHERE name='BFBS Radio';
update channel SET channum=790, visible=1 WHERE name='TWR';

-- Regional Channels (set your local choices further on in this script)
-- BBC One - Channel 101
update channel SET channum=950, visible=1, name='BBC 1 London'   WHERE serviceid='6301';
update channel SET channum=951, visible=1, name='BBC 1 CI'       WHERE serviceid='6361';
update channel SET channum=952, visible=1, name='BBC 1 E Mids'   WHERE serviceid='10305';
update channel SET channum=953, visible=1, name='BBC 1 East (E)' WHERE serviceid='10306';
update channel SET channum=954, visible=1, name='BBC 1 East (W)' WHERE serviceid='6351';
update channel SET channum=955, visible=1, name='BBC 1 N West'   WHERE serviceid='6441';
update channel SET channum=956, visible=1, name='BBC 1 NE & C'   WHERE serviceid='6471';
update channel SET channum=957, visible=1, name='BBC 1 NI'       WHERE serviceid='10361';
update channel SET channum=958, visible=1, name='BBC 1 Oxford'   WHERE serviceid='10356';
update channel SET channum=959, visible=1, name='BBC 1 S East'   WHERE serviceid='6461';
update channel SET channum=960, visible=1, name='BBC 1 Scotland' WHERE serviceid='6421';
update channel SET channum=961, visible=1, name='BBC 1 South'    WHERE serviceid='10353';
update channel SET channum=962, visible=1, name='BBC 1 S West'   WHERE serviceid='10354';
update channel SET channum=963, visible=1, name='BBC 1 W Mids'   WHERE serviceid='10301';
update channel SET channum=964, visible=1, name='BBC 1 Wales'    WHERE serviceid='10311';
update channel SET channum=965, visible=1, name='BBC 1 West'     WHERE serviceid='6341';
update channel SET channum=966, visible=1, name='BBC 1 Yorks'    WHERE serviceid='6451';
update channel SET channum=967, visible=1, name='BBC 1 Yrks&Lin' WHERE serviceid='10303';

-- BBC One HD - Channel 106
update channel SET channum=972, visible=1, name='BBC One HD'          WHERE serviceid='6941';
update channel SET channum=973, visible=1, name='BBC One Scotland HD' WHERE serviceid='8901';
update channel SET channum=976, visible=1, name='BBC One Wales HD'    WHERE serviceid='8911';
update channel SET channum=978, visible=1, name='BBC One NI HD'       WHERE serviceid='6943';

-- BBC Two - Channel 110
update channel SET channum=968, visible=1, name='BBC 2 England' WHERE serviceid='6302';
update channel SET channum=969, visible=1, name='BBC 2 NI'      WHERE serviceid='10362';
-- Regional Doc unclear, so keeping HD channel
-- update channel SET channum=971, visible=1, name='BBC 2 Wales'   WHERE serviceid='10312';

-- BBC Two HD - Channel 102/106 ??
update channel SET channum=949, visible=1, name='BBC Two HD'       WHERE serviceid='6940';
update channel SET channum=971, visible=1, name='BBC Two Wales HD' WHERE serviceid='6912';

-- ===============================================================================================
-- Set your local regional channels here
-- ===============================================================================================
-- BBC
update channel SET channum=101, visible=1, name='BBC One'    WHERE serviceid='6341';
update channel SET channum=102, visible=1, name='BBC Two HD' WHERE serviceid='6940';
update channel SET channum=106, visible=1, name='BBC One HD' WHERE serviceid='6941';
update channel SET channum=110, visible=1, name='BBC Two'    WHERE serviceid='6302';

-- ITV
-- These are not all displayed on a standard Freesat list, unlike BBC you only get your region.
-- The callsign and name are all set to ITV or similar.  Only the serviceid is an indicator
-- There is nothing to stop you putting the lot in your EPG at the end like the BBC channels
-- You need to set your serviceids here - these are for "West"
update channel SET channum=103, visible=1, name='ITV'    WHERE serviceid='12170';
update channel SET channum=111, visible=1, name='ITV HD' WHERE serviceid='20770';
update channel SET channum=112, visible=1, name='ITV+1'  WHERE serviceid='10125';

-- End of regional channels
-- ===============================================================================================

-- Channel fixups -------------------------------------------------
-- CBS Reality has two sids 55214 and 51216
update channel SET visible=0 WHERE serviceid='55214';
-- Sky News has two sids 4704 and 4706
update channel SET visible=0 WHERE serviceid='4706';
-- Channel fixups -------------------------------------------------

-- Mark BBC channels as advert free and not requiring commercial flagging.
UPDATE channel SET commmethod=-2 WHERE name LIKE '%BBC%' OR name = 'CBeebies';

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

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

Freeview

Custom or combined lists

Notes

ITV channel serviceids for Freesat at 1 Sep 2019. Remove this when a better source is found.

ITV
Channel serviceid
ITV2 HD (pay TV) 20710
ITV Wales HD 20730
ITV Granada HD 20740
ITV Tyne Tees HD 20750
ITV South West HD ^ 20760
ITV West HD ^ 20770
STV Central West HD 20800
UTV HD 20810
ITV Box Office HD(pay) 20825
ITV Anglia E HD 20840
ITV Border England HD 20850
ITV London HD 21000
ITV Meridian SE HD 21020
ITV Central West HD 21030
ITV Yorks W HD 21040
ITV 3 HD (pay TV) 21050
ITV 4 HD (pay TV) 21060
ITV London 10060
ITV Granada 10080
ITV Anglia East 10090
ITV+1 Anglia East 10091
ITV Central West 10100
ITV+1 Meridian SE 10101
ITV2 10070
CITV 10071
ITV4 10072
ITV4+1 10073
ITVBe 10075
ITV Border (Engl.) 10120
ITV+1 West^ 10125
ITV Tyne Tees 10130
ITV Meridian South 10140
ITV+1 Central West 10145
ITV Meridian SE 10150
ITV+1 London 10155
ITV Yorkshire West 10160
ITVBe+1 10139
ITV2+1 10165
ITV Channel Television 10200
STV North (Aberdeen) 10210
STV Central West (Glas) 10220
STV Central East (Edin) 10221
STV North (Dundee) 10225
UTV 10230
UTV+1 10231
ITV South West^ 10240
ITV+1 Granada 10255
ITV3 10260
ITV3+1 10261
ITV Meridian Thames V. 12101
ITV+1 Tyne Tees 12105
ITV Anglia West 12110
ITV Yorkshire East 12120
ITV Border (Scotland) 12130
ITV Central East 12145
ITV Wales 12150
ITV+1 Wales 12155
ITV+1 Yorkshire 12165
ITV West^ 12170
ITV+1 South West^ 12175


Custom Channel Configuration Backup and Restore