[mythtv-users] Easiest way to edit channels

Peter Bennett pb.mythtv at gmail.com
Mon Dec 13 00:55:55 UTC 2021

On 12/12/21 4:28 PM, Kevin Johnson wrote:
> Hi All.
> Running Ubuntu 20.01 and Mythtv 31
> I have cable using a hdhr prime.  I only get the basic channels.
> Setting up the guide.xmltv is not for the faint of heart. But I got it.
> Only thing is I am setup to get all the channels.  900 or more.
> Going through and selecting each one individually is obviously time 
> consuming.
> So my guide is filled with data not useful to me.
> I have come across some suggestions such as using a python script, 
> chedit.pl <http://chedit.pl> and other ways.
> But to be honest I am not savvy enough to use the found methods 
> effectively.
> Can I use the channel-editor in mythtv WebFrontend?  I can do it while 
> watching tv from my couch which would be nice. But when I tried that 
> it did not seem to update the channels as expected.  I deleted the 
> channels but they still are seen in the guide data on the frontends.  
> Do I need to run mythfilldatabase afterwards?  Maybe wait a few hours?
> Or should I do it directly on the backend using channel editor?  Does 
> soing so actually edit the xmltv file?  My backend is in the basement 
> and I would prefer to be able to do this from the comfort of my couch.
> Or?
> Thank you.
If you just delete the channels in MythTV, they will be added back the 
next time you run mythfilldatabase, so that is not helpful (unless you 
specify --only-update-guide in mythfilldatabase, in which case it is 
downloading them anyway and just not adding them)

You need to update them in the sqlite database. If you are using 
tv_grab_zz_sdjson_sqlite, set up something like this in a file. Set 
selected=1 for the channels you want and selected=0 for those you don't 

update channels set selected = 1 where channum = 2;
update channels set selected = 1 where channum = 3;
update channels set selected = 1 where channum = 983;
update channels set selected = 1 where channum = 986;

Update them with a command like this:
sqlite3 $HOME/.xmltv/SchedulesDirect.DB < selected.sql

Then you will no longer get listings for those channels you don't want, 
and it won't download them. You can delete the channels from MythTV if 
you like, or just leave them and after two or three weeks they will show 
no guide data.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20211212/2ffec8ea/attachment.htm>

More information about the mythtv-users mailing list