[mythtvnz] New channels happening from March 21st

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Mar 20 06:18:20 GMT 2022


On Sun, 20 Mar 2022 15:59:16 +1300, you wrote:

>There are good instructions on channel scanning here:
>
>https://www.mythtv.org/wiki/Channel_Scanning
>
>Make sure you turn on the "Full search for old channels" option.  Then
>do "Scan of all existing transports".  That will scan all 5 of the
>multiplexes on their existing frequencies.  If you do not have 5
>multiplexes at present, or if a new one is ever added or the
>frequencies ever get changed, then you need to use "Full scan" so that
>all valid frequencies will be scanned to see if a multiplex is
>transmitting on them.  A full scan takes a long time as there are
>many, many unused frequencies to check to find the 5 that are actually
>in use.

Also, you will need to get EPG for the new channels.  So after the
channel scan you will need to edit them and add an xmltvid that
matches your EPG source.  I get my FreeviewHD EPG using mhegepgsnoop,
so to make that work, I need to have the xmltvid value that will fuzzy
match to the channel name that is broadcast by Freeview.  Until we can
see those names (at 06:00 on Mon 2022-03-21), we do not know for sure
what will match, but it is pretty easy to guess that these will work:

eden.freeviewnz.tv
rush.freeviewnz.tv

Since Choice TV is disappearing, anything that you record from there
that has a recording rule that is set to "This channel" will need to
be fixed to record from Eden instead.  In my database, this SQL finds
all such rules:

select recordid,type,chanid,starttime,title,station,filter from record
where filter & 1024 = 1024 and station='ChoiceTV';

As I understand it (and I could be wrong), the "This channel" option
sets a bit in the record.filter field that the mask 1024 (hex 400)
matches.  When that bit is on, the recording rule uses the
record.station field to find the matching chanid values from the
channel table callsign field and records only when the EPG data
program.chanid field matches one of those chanid values.  So, assuming
that the channel.callsign for Eden turns out to be "Eden", then this
SQL should change all the Choice TV "This channel" rules to now record
from Eden:

update record set station='Eden' where filter & 1024 = 1024 and
station='ChoiceTV';

However, when the Choice TV channel gets deleted, it is possible that
all those Choice TV only rules may be deleted, so I will be making a
copy of my record table before doing the new channel scan so that I
can put all those rules back again afterwards if that happens, and
then I will be able to modify them as above.  The easy way to keep a
copy of your old record table is this SQL:

create table record_old like record;
insert into record_old select * from record;

Then after the channel scan, if those rules have been deleted, they
can be added back by this:

insert into record select * from record old where filter & 1024 = 1024
and station='ChoiceTV';

and then the above update SQL can be done to them.  When you are
finished with the record_old table, it can be deleted with this:

drop table record_old;

WARNING: If you want to do this sort of SQL updating of your database,
you MUST do a database backup first, so that you can restore it if
anything goes wrong.



More information about the mythtvnz mailing list