[mythtv-users] clearing channel list in mythweb

Klaas de Waal klaas.de.waal at gmail.com
Tue Aug 11 20:29:16 UTC 2020


Starting with version 31 mythtv-setup preserves the visibility status when
a new channel scan is done. This does NOT work if you delete all channels
and then do a scan, but if you do a scan and then update the
existing channels the visibility, the xmltvid and the iconpath are
preserved.

On Tue, 11 Aug 2020 at 20:23, Stephen Worthington <stephen_agent at jsw.gen.nz>
wrote:

> On Tue, 11 Aug 2020 18:53:23 +0200, you wrote:
>
> >Hi,
> >
> >in mythweb I have hundreds of available channels, but in the mythtv
> >program guide I only want to see about 30 channels for german tv.
> >
> >Is there a way to clear the list of visible channels in mythweb and then
> >to make visible again only the channels I want ? There is no button to
> >do that.
> >
> >I did this several times manually, but this is a lot of work.
> >
> >Klaus
>
> I think that you will need to do it manually again this time.  For the
> future, it would be possible to keep a list of the channels in the
> database that are set to be visible so that you can apply that again
> in the future:
>
> sudo mysql
> use mythconverg;
> drop table if exists visible_channels;
> create table visible_channels (sourceid int(10) unsigned, callsign
> varchar(20));
> insert into visible_channels (select sourceid,callsign from channel c
> where c.visible!=0);
> quit
>
> Then when you need to set the visible channels again after a channel
> scan:
>
> sudo mysql
> use mythconverg;
> update channel set visible=0;
> update channel c set visible=1 where (select count(*) from
> visible_channels v where c.sourceid=v.sourceid and
> c.callsign=v.callsign)=1;
> quit
>
> Note that if your new scan has added some new channels that you want
> to be visible, you would need to manually make them visible and then
> run the first script again.  If you delete and re-create an entire
> source, then this would not work as the sourceid would change.  But it
> would then still be possible to use SQL alter the sourceid values in
> the visible_channels table to match the new sourceid:
>
> sudo mysql
> use mythconverg;
> update visible_channels set sourceid=<new sourceid> where
> sourceid=<old sourceid>;
> quit
>
> and then run the second script.
>
> If you want to clear all the visible values for the channels so you
> only have to set the 30 or so you want in MythWeb, this will do it:
>
> sudo mysql
> use mythconverg;
> update channel set visible=0;
> quit
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20200811/314a5a41/attachment.htm>


More information about the mythtv-users mailing list