<div dir="ltr">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. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 11 Aug 2020 at 20:23, Stephen Worthington <<a href="mailto:stephen_agent@jsw.gen.nz">stephen_agent@jsw.gen.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, 11 Aug 2020 18:53:23 +0200, you wrote:<br>
<br>
>Hi,<br>
><br>
>in mythweb I have hundreds of available channels, but in the mythtv <br>
>program guide I only want to see about 30 channels for german tv.<br>
><br>
>Is there a way to clear the list of visible channels in mythweb and then <br>
>to make visible again only the channels I want ? There is no button to <br>
>do that.<br>
><br>
>I did this several times manually, but this is a lot of work.<br>
><br>
>Klaus<br>
<br>
I think that you will need to do it manually again this time.  For the<br>
future, it would be possible to keep a list of the channels in the<br>
database that are set to be visible so that you can apply that again<br>
in the future:<br>
<br>
sudo mysql<br>
use mythconverg;<br>
drop table if exists visible_channels;<br>
create table visible_channels (sourceid int(10) unsigned, callsign<br>
varchar(20));<br>
insert into visible_channels (select sourceid,callsign from channel c<br>
where c.visible!=0);<br>
quit<br>
<br>
Then when you need to set the visible channels again after a channel<br>
scan:<br>
<br>
sudo mysql<br>
use mythconverg;<br>
update channel set visible=0;<br>
update channel c set visible=1 where (select count(*) from<br>
visible_channels v where c.sourceid=v.sourceid and<br>
c.callsign=v.callsign)=1;<br>
quit<br>
<br>
Note that if your new scan has added some new channels that you want<br>
to be visible, you would need to manually make them visible and then<br>
run the first script again.  If you delete and re-create an entire<br>
source, then this would not work as the sourceid would change.  But it<br>
would then still be possible to use SQL alter the sourceid values in<br>
the visible_channels table to match the new sourceid:<br>
<br>
sudo mysql<br>
use mythconverg;<br>
update visible_channels set sourceid=<new sourceid> where<br>
sourceid=<old sourceid>;<br>
quit<br>
<br>
and then run the second script.<br>
<br>
If you want to clear all the visible values for the channels so you<br>
only have to set the 30 or so you want in MythWeb, this will do it:<br>
<br>
sudo mysql<br>
use mythconverg;<br>
update channel set visible=0;<br>
quit<br>
_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" rel="noreferrer" target="_blank">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" rel="noreferrer" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" rel="noreferrer" target="_blank">https://forum.mythtv.org</a><br>
</blockquote></div>