[mythtvnz] Sugarloaf restack of DVB-T frequencies next week
Worik Stanton
worik.stanton at gmail.com
Mon Jul 23 01:43:57 BST 2012
[snip]
> No, the freqid is not the right value to change. The correct value is
> the frequency field in dtv_multiplex. The best way to do this change
> is to use the script I have posted here for the previous transmitters
> that have already been restacked. Just change the freqid/newfreqid
> parameters at the in the script to match your site. Here it is again
> as for the Wharite changes:
Woah!! Surly we can use the backend settings "mythtv-setup"? Making
changes to the database via mysql seems like the wrong tool to me!
cheers
Worik
>
> #!/bin/bash
> # Update the channel frequencies for FreeviewHD from Wharite for the
> 13-Mar-2012 changes.
> source /etc/mythtv/mysql.txt
> mysql -u $DBUserName -p$DBPassword -h $DBHostName $DBName << EOF
> drop function if exists calcfreq;
> delimiter $$
> create function calcfreq(freqid int) returns int
> begin
> return (506000000+(8000000*(freqid - 25)));
> end$$
> delimiter ;
>
> set @freqid1 = 50;
> set @newfreqid1 = 32;
> set @freqid2 = 48;
> set @newfreqid2 = 34;
> set @freqid3 = 59;
> set @newfreqid3 = 36;
>
> /*
> select calcfreq(@freqid1);
> select calcfreq(@freqid2);
> select calcfreq(@freqid3);
> select calcfreq(@newfreqid1);
> select calcfreq(@newfreqid2);
> select calcfreq(@newfreqid3);
> */
>
> update channel set freqid = @newfreqid1 where freqid = @freqid1;
> update channel set freqid = @newfreqid2 where freqid = @freqid2;
> update channel set freqid = @newfreqid3 where freqid = @freqid3;
> update dtv_multiplex set frequency = calcfreq(@newfreqid1) where
> frequency = calcfreq(@freqid1);
> update dtv_multiplex set frequency = calcfreq(@newfreqid2) where
> frequency = calcfreq(@freqid2);
> update dtv_multiplex set frequency = calcfreq(@newfreqid3) where
> frequency = calcfreq(@freqid3);
>
> drop function calcfreq;
> EOF
>
> exit 0
>
>
> As usual with scripts posted on newsgroups, watch out for your
> newsreader wrapping lines.
>
> _______________________________________________
> mythtvnz mailing list
> mythtvnz at lists.linuxnut.co.nz
> http://lists.ourshack.com/mailman/listinfo/mythtvnz
> Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
>
--
it does not matter I think that I shall never see
how much I dig and dig A billboard lovely as a tree
this hole just Indeed, unless the billboards fall
keeps getting deeper I'll never see a tree at all
More information about the mythtvnz
mailing list