[mythtv-users] Channel Groups

Stephen Worthington stephen_agent at jsw.gen.nz
Tue Sep 29 07:29:02 UTC 2020


On Tue, 29 Sep 2020 11:33:57 +0530, you wrote:

>Hello,
>I would like to group channels into various categories like Movies, Music,
>Sports etc. It seems that this information goes to table 'channelgroup' and
>'channelgroupnames'. I feed my EPG data using mythfilldatabase and an xmltv
>file. Looking at the xmltvparser.cpp [1] code it is not obvious how the
>channel group table is populated. Does anybody know how I can set the
>channel group using xmltv?
>
>Thanks
>
>[1]
>https://code.mythtv.org/trac/browser/mythtv/mythtv/programs/mythfilldatabase/xmltvparser.cpp?rev=bcbcb356dc8ceaf3579474e6772fd451eb8d8fd7

As far as I know there is no support in MythTV for automatically
grouping channels.  It is all done manually.  There is one channel
group created automatically, "Favorites", grpid 1.  From the Guide you
can add channels to the Favorites group.  I think that if you created
another group using SQL, you would be able to add channels to that
group also, and to select that group to be displayed in the Guide. But
I do not know of any way for the GUI to create a new channel group.

There also seems to be a bug - I have channels in the Favorites group
in my channelgroup table that I have long since deleted from the
channel table.  So the channel delete code is not checking the
channelgroup table when it deletes a channel, in v30 anyway.

It should be possible to write some Python or Perl to read the
category information in the program table and set up channel groups
from that.  However, it would need to be a bit intelligent to work out
that a channel that has lots of categories should not be classified as
any single one of them - just because a general purpose channel plays
some sport, it probably should not be in the Sports channel group.  So
maybe if a channel has say 90% or more of the same category for its
programmes, it should be automatically classified as being in that
channel group.

BTW The MythTV code has moved to github - I believe Trac is now
historical only:

https://github.com/MythTV/mythtv


More information about the mythtv-users mailing list