[mythtv-users] Easiest way to edit channels

Mike Perkins mikep at randomtraveller.org.uk
Mon Dec 13 09:24:08 UTC 2021


On 13/12/2021 01:41, Kevin Johnson wrote:
> On Sun, Dec 12, 2021 at 6:57 PM Peter Bennett <pb.mythtv at gmail.com> wrote:
> 
>>
>> 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 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
>> want.
>>
>> 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.
>>
>> Peter
>>
> 
> I am using  tv_grab_zz_sdjson_sqlite
> 
> Thank you for the suggestion.  Do I need to do this for each and every
> channel?
> That would be kind of time consuming doing it for 900 channels.  Maybe I am
> not understanding?
> 
> Command line editing a database is just not something I am familiar with.
> 
That is one file with a line for each channel. You need run the command only once, using that file 
as input.

If you subsequently change your channel selection, you can update that file and rerun it.

-- 

Mike Perkins



More information about the mythtv-users mailing list