Opened 14 years ago

Closed 10 years ago

Last modified 10 years ago

#199 closed enhancement (fixed)

multiple favorite channel groups

Reported by: xris Owned by: paulh
Priority: minor Milestone: 0.22
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: yes

Description (last modified by xris)

I'm very close to just implementing this specifically for mythweb, but since I see it as a valid feature for mythfrontend, I'd like to work with whoever is in charge of this to come up with a solution that everyone can use...

My DishNetwork controller has the ability to create up to 4 channel groups, plus the default "all" group. I'd like something like this for mythtv, so I can segment off groups of channels I may not often want to watch or see in listings (say, all of the sports channels), but don't want to just ignore come time for the X-games, olympics, etc. Same goes with news channels, etc. It shouldn't be too hard to expand the current single-option favorites into a set of named favorite channel groups. As long as a standard is agreed upon, even if not implemented within the frontend for awhile, I can at implement it (and an editor for it) within mythweb, which is the only place I ever use the program guide.

Attachments (22)

myth_guide_groups_r10968.diff (12.5 KB) - added by Mark.Buechler@… 13 years ago.
Guide Groups patch
favorites.diff (47.8 KB) - added by maverik044 <level42@…> 12 years ago.
New favorites patch
favorites_db.diff (2.3 KB) - added by maverik044 <level42@…> 12 years ago.
Database portion, for SVN 14461, don't recommend applying for testing, update database manually please.
favorites_update.diff (49.5 KB) - added by Bill <level42@…> 12 years ago.
Updated for SVN 14755; Added favorite channel editor
favorites_update.2.diff (49.5 KB) - added by Bill <level42@…> 11 years ago.
Updated for SVN 15223
channelgroup.diff (49.1 KB) - added by Bill <level42@…> 11 years ago.
Updated for SVN15419; NOTE MYSQL CHANGES HAVE CHANGED SEE NOTE BELOW
channelgroup.2.diff (48.3 KB) - added by Bill <level42@…> 11 years ago.
Updated for SVN15504
channelgroup.3.diff (52.7 KB) - added by wstewart@… 11 years ago.
updated for trunk, see comment. Will not work with 0.21-fixes.
01-199-channelgroup.4.diff (52.8 KB) - added by Matthew Wire <devel@…> 11 years ago.
Update so it compiles. Was missing <algoritm> header
01-199-channelgroup.4.1.patch (49.9 KB) - added by Matthew Wire <devel@…> 10 years ago.
Minor compile fix to guidegrid.h since headers have been rearranged
changroups.19873.diff (35.0 KB) - added by bander.ajba@… 10 years ago.
patch for trunk svn 19873
changroups.19873.2.diff (35.0 KB) - added by bander.ajba@… 10 years ago.
ignore the previous patch. this one works -- trunk svn 19873
changroups.19873.3.diff (35.0 KB) - added by bander.ajba@… 10 years ago.
ignore the previous patch. this one works -- trunk svn 19873
channgroup.tar (20.0 KB) - added by bander.ajba@… 10 years ago.
please untar this file in mythtv/libs/libmythtv in order for the previous patch (changroup.19873.3.diff) to work
00-199-channelgroups.6.patch (50.0 KB) - added by Matthew Wire <devel@…> 10 years ago.
Update for SVN19972
00-199-channelgroups.7.patch (56.9 KB) - added by Matthew Wire <devel@…> 10 years ago.
Update for 20043 and remove obsolete favorites code
00-199-channelgroups.7.dbcheck.patch (2.0 KB) - added by Matthew Wire <devel@…> 10 years ago.
DB update for 20043
00-199-channelgroups.7.1.patch (57.0 KB) - added by Matthew Wire <devel@…> 10 years ago.
Update for svn 20153
00-199-channelgroups.7.1.dbcheck.patch (3.1 KB) - added by Matthew Wire <devel@…> 10 years ago.
Update for svn. Do not use the previous dbcheck patch since it creates the wrong tables. This one is correct
00-199-channelgroups.7.2.patch (57.0 KB) - added by Matthew Wire <devel@…> 10 years ago.
Refresh against 20301
channelgroup.4.diff (66.0 KB) - added by wstewart@… 10 years ago.
Updated for SVN 20401
channelgroup.5.diff (64.5 KB) - added by wstewart@… 10 years ago.
Updated for SVN 20471

Download all attachments as: .zip

Change History (87)

comment:1 Changed 14 years ago by xris

Description: modified (diff)

comment:2 Changed 14 years ago by Isaac Richards

Owner: changed from Isaac Richards to xris

comment:3 Changed 14 years ago by kkuphal

I think this can easily be accomplished from a design standpoint by adding one table and modifying the existing favorites table.

  1. favorite_group table which is simply (id, name) to allow for unlimited groups
  1. favorites table which is (userid, chanid) to map channels to a favorite group.

We can reuse the existing userid field in the favorites table (which is unused based on my browsing of the code) and rename it to groupid with a simple ALTER statement.

Selecting all channels in a group is as easy as joning favorite_group, favorites, and channel to select where favorite_group.id = favorites.groupid and favorites.chanid = channel.chanid.

Existing code would still work until a second group is added as the initial favorite group would simply be current the favorites table where groupid = 0. A default entry would need to be added to the favorite_group table on creation.

The frontend interface for setting favorites would need to be changed then when adding support to MythWeb. I'd suggest using '?' to open a kind of channel group editor to add/remove groups as well as toggle channels in each group. '/' can be used then to cycle the lists. Some kind of visual indicator would also be needed to denote the current favorite group being displayed. The current use of '?' when watching Live TV would need to change to change to the first channel in the next channel group while '/' would work to cycle through channels in the existing group.

comment:4 Changed 14 years ago by cpinkham

Meant to reply to this before vacation but forgot. Only addition I can think of to Kevin's comment is that you might want to have a way to order channels within a channel group. A User's "Movies" group might cycle through all the premium movie channels, then the non-premium. I have Dish also and used to use the groups feature before I setup m Myth box.

comment:5 Changed 13 years ago by anonymous

My biggest request around this would be a special group which would contain "All Available" channels. In other words, only inlclude channels which are associated with free tuners. Or maybe some generic way of indicating within the guide which channels are available and which aren't.

comment:6 Changed 13 years ago by danielk

Milestone: 0.20
Version: head

comment:7 Changed 13 years ago by cpinkham

Milestone: 0.20unknown

comment:8 Changed 13 years ago by bander.ajba@…

is this ticket dead?

I'm willing to code / test or whatever is required to get this function working in myth

comment:9 Changed 13 years ago by Mark.Buechler@…

I'm including a patch which allows for this. The only part missing is the GUI part which assigns a channel to a guide group. Right now they have to be manually added.

  • Mark.

Changed 13 years ago by Mark.Buechler@…

Guide Groups patch

comment:10 Changed 13 years ago by stuartm

Owner: changed from xris to stuartm

comment:11 Changed 13 years ago by bander.ajba@…

Hello,

what's the database modifications / tables needed to have this patch working with mythtv.

comment:12 Changed 12 years ago by unknwon

has this been added to the Trunk Yet. Would love this..

comment:13 Changed 12 years ago by maverik044 <level42@…>

Attached is an alternate implementation based on the patch above. The previous patch was not complete as it did not include capability to create groups and update the database.

I've attached two patches, the main favorites patch and the database update portion. The database portion is separate as it is the part that needs to be changed with svn changes (ie. DBSchemaVer change). Not good idea for DBSchemaVer to get out of sync with SVN, so the database patch is primarily useful for SVN incorporation of this code.

So if you wish to test the patch, I suggest modifying the database manually as: CREATE TABLE IF NOT EXISTS favoritegroups (favgrpid int(11) unsigned NOT NULL auto_increment, name varchar(64) NOT NULL default , PRIMARY KEY (favgrpid)); ALTER TABLE favorites ADD COLUMN favgrpid int(11) NOT NULL default 1;

I've added settings to the frontend settings pages. Under "TV Settings" general a new page is added that allows selection of the default favorite group to use, or if you just want to remember the last one selected in live_tv/guide. Also an option to browse/change-channel using favorites only.

Added a new entry under "TV Settings", "Channel Favorite Groups" where one can added favorite groups. This is just to add the name of a new group. Adding channels to the group is done within the guide.

Ok, for the TV portion. While in live TV, a new menu item has been added to the OSD menu that allows selection of the favorite group. You can select "All Channels" (ie. no favorites), or one of the favorite groups you define. If the "Browse/Change? channels with Favorites" is selected in the settings, then you will only browse/change-channels based on the your favorites, but if you select "All channels", then you'll browse/change-channel based on all channels. The FAV button is currently non-functional, as I couldn't find an easy way to pop-up a menu in livetv to select which favorite group to add the channel to. I can build an OSD menu to select the favorite group to add a channel to if desired. The NEXTFAV works and is effectively "Channel UP" within the selected favorite group.

The currently selected favorite group will be used for the guide. While in the guide the NEXTFAV button with change which favorite group the channels are displayed for. It will cycle through all your defined favorite groups and All channels. If you press FAV while in "All channels" it will pop-up a menu asking which favorite group to add the channel to. If you press FAV will viewing channels of your favorite group, it will delete the favorite from that group. When you exit the guide, the favorite group you selected is remember for livetv and also if you re-enter the guide. If you exit livetv, the last group you selected is not remembered unless you select that option in the settings.

If you add the following to ui.xml after the "current_info" container in programguide and programguide-video:

<container name="favorite_group">

<area>14,150,250,30</area> <textarea name="favgroup" draworder="4" align="left">

<area>0,0,240,30</area> <font>info</font>

</textarea>

</container>

The name of the currently selected favorite group will be shown. If you've selected ALL channels, that will be shown instead.

This patch makes some code obsolete, particularily the ToggleFavorite? code in remoteencoder.cpp/encoderlink.cpp and tv_rec.cpp. The favorite list and adding/deleting favorites is noow entirely handled on the frontend. Before this patch favorite toggle in the guide was handled in the frontend (ie. guidegrid.cpp), and favorite toggle in livetv is passed to tv_rec.cpp on the backend via remoteencoder.cpp/encoderlink.cpp. If this patch is accepted, I can add a patch that removes the code from remoteencoder.cpp/encoderlink.cpp/tv_rec.cpp that is no longer necessary.

Changed 12 years ago by maverik044 <level42@…>

Attachment: favorites.diff added

New favorites patch

Changed 12 years ago by maverik044 <level42@…>

Attachment: favorites_db.diff added

Database portion, for SVN 14461, don't recommend applying for testing, update database manually please.

comment:14 Changed 12 years ago by maverik044 <level42@…>

favorites.diff has been tested on SVN 14616.

Changed 12 years ago by Bill <level42@…>

Attachment: favorites_update.diff added

Updated for SVN 14755; Added favorite channel editor

comment:15 Changed 12 years ago by Bill <level42@…>

I've attached an updated patch. I've updated it for SVN14755; also I've added a favorite channel editor from the settings GUI. It's a little cumbersome to add favorties from the EPG, in the settings GUI, all channels are listed with checkboxes that you can select or unselect the channel from the favorite group.

comment:16 Changed 11 years ago by anonymous

I applied the latest patch (favorites_update.diff) to SVN14967. It applied cleanly with only offsets, but Mythtv fails to compile:

/usr/X11R6/include -I/usr/X11R6/include -o favoritegroup.o favoritegroup.cpp favoritegroup.cpp: In member function ‘void FavoriteGroupEditor::doDelete()’: favoritegroup.cpp:313: error: ‘show2ButtonPopup’ is not a member of ‘MythPopupBox?’ make[2]: * [favoritegroup.o] Error 1 make[2]: Leaving directory `/usr/src/mythtv/libs/libmythtv' make[1]: * [sub-libmythtv] Error 2 make[1]: Leaving directory `/usr/src/mythtv/libs' make: * [sub-libs] Error 2

comment:17 Changed 11 years ago by Bill <level42@…>

that doesn't surpise me, there was been some changes in SVN to the ui code recently. Should be a relatively easy fix, I'll fix it in the next few days to a week. I have some bigger problems to fix first (crash ...)

comment:18 Changed 11 years ago by anonymous

Thanks Bill.

Your product is exactly what both VDR and Mythtv have been missing make them fully useful in North America, where there are just too many channels to be successfully organized into one favourites group. Once I get it working I intend to advertise it over at Linux forum on DVBN.

dishbert

comment:19 Changed 11 years ago by bander.ajba@…

Hello Bill,

any progress in this patch. I think this patch is very critical feature and should be merged in SVN. I have one comment regarding the favorite group channels selector you added lately, it would be very effecient if you list all channels in one scrollable pane with checkbox. because users who want to add one more favorite at a later time they have to go through 11~17 pages of channels in my case (very annoying). even if you do not enhance it, it would be something to be looked at later. but please bless us with your patch.

--Bander

comment:20 Changed 11 years ago by anonymous

I would also love to see this patch committed to the SVN.

comment:21 Changed 11 years ago by stuartm

Ticket locked: set

Changed 11 years ago by Bill <level42@…>

Attachment: favorites_update.2.diff added

Updated for SVN 15223

comment:22 Changed 11 years ago by stuartm

Status: newaccepted

comment:23 Changed 11 years ago by stuartm

Status: acceptedstarted
Ticket locked: unset

I want to start looking at this, but the patch updated for 15223 has several conflicts with trunk.

Bill, you might find it easier to use svn diff against a modified checkout of trunk rather than "diff -Naur --exclude='*.orig' --exclude='*.qm'"

comment:24 Changed 11 years ago by stuartm

Forgot to mention, that I think it would be better to drop 'favorite' from the patch altogether. "Favourite channel groups" implies a certain use case, whereas I saw this being a more generic feature.

e.g. Some people might use it for grouping favourite channels together, others* might use it to group channels according to their category (Sports, Entertainment, Music, Radio) and with some additions, another person might use it as part of access control (only allow kids to view children's TV or to block adult channels).

"Channel Groups" is a more fitting description.

  • XMLTV are looking at extending the xmltv specification to include such grouping information, so that channels might be automatically grouped according to their main content. This is especially useful for Satellite and Cable lineups with hundreds of channels, it is also the standard behaviour for Cable and Satellite boxes here in the UK.

comment:25 Changed 11 years ago by Bill <level42@…>

Ok, I did test the patch with patch -p1 to apply from within the mythtv directory, but I guess there may have been some changes since 15223 that may have broken it. I'll try 'svn diff', didn't know about that. I'll update it but it could take a week or so. I'll change the names also as suggested to channel group.

Would you mind taking at look at the portion of the patch to guidegride.cpp, in particular the SelectFavoriteGroup? routine. I don't know if I'm using the right functions in light of the intended conversion of everything to libmythui. I'll change that now if its not inline with the conversion. I think that the ui code in favoritegroup.cpp should be ok, since it is largely based on playbackgroup.cpp and storagegroup.cpp.

Also there will be some clean-ups to do, these are not in the patch as I was first looking for feedback from you first. Examples are the ToggleFavorite? code in remoteencoder.cpp/encoderlink.cpp and tv_rec.cpp. These are no longer used, but not deleted. Everything for the channel grouping is handled on the frontend.

I'm willing to help out as much as I can to update this patch to be suitable for SVN.

Thanks.

comment:26 Changed 11 years ago by Bill <level42@…>

I've updated the patch for SVN 15419, and changed all references of "favorites" to channelgroup as requested.

Note that as a result of this, the table names have changed. Please create new tables or modify existing ones if you are already using this patch. I use the Mysql browser from windows. To add the tables: CREATE TABLE IF NOT EXISTS channelgroup (grpid int(11) unsigned NOT NULL auto_increment, name varchar(64) NOT NULL default , PRIMARY KEY (grpid)); CREATE TABLE IF NOT EXISTS channelgroupnames (grpid int(10) unsigned NOT NULL auto_increment,name varchar(64) NOT NULL default ,PRIMARY KEY (grpid));

To show the channelgroup selected in the guide, add this to your theme ui.xml to the programguide window <container name="channel_group"> <area>14,150,250,30</area> <textarea name="favgroup" draworder="4" align="left"> <area>0,0,240,30</area> <font>info</font> </textarea> </container> Adjust area accordingly.

Use patch -p1 < channelgroup.diff from within the mythtv dir to apply

Changed 11 years ago by Bill <level42@…>

Attachment: channelgroup.diff added

Updated for SVN15419; NOTE MYSQL CHANGES HAVE CHANGED SEE NOTE BELOW

comment:27 Changed 11 years ago by Bill <level42@…>

Sorry got the table creation instructions wrong, should be:

CREATE TABLE IF NOT EXISTS channelgroup (id int(10) unsigned NOT NULL auto_increment, chanid int(11) unsigned NOT NULL default '0', grpid int(11) NOT NULL default '1', PRIMARY KEY (id));

CREATE TABLE IF NOT EXISTS channelgroupnames (grpid int(10) unsigned NOT NULL auto_increment,name varchar(64) NOT NULL default ,PRIMARY KEY (grpid));

comment:28 in reply to:  27 Changed 11 years ago by jmwislez

CREATE TABLE IF NOT EXISTS channelgroupnames (grpid int(10) unsigned NOT NULL auto_increment,name varchar(64) NOT NULL default ,PRIMARY KEY (grpid));

the latter should read:

CREATE TABLE IF NOT EXISTS channelgroupnames (grpid int(10) unsigned NOT NULL auto_increment,name varchar(64) NOT NULL default ,PRIMARY KEY (grpid));

with an empty string as default value for name.

comment:29 Changed 11 years ago by Matthew Wire <devel@…>

This doesn't apply since the multirec merge. I did start manually merging it but I think it needs looking over more carefully since some parts have changed.

comment:30 in reply to:  26 Changed 11 years ago by ismael@…

Replying to Bill <level42@sympatico.ca>:

To show the channelgroup selected in the guide, add this to your theme ui.xml to the programguide window <container name="channel_group"> <area>14,150,250,30</area> <textarea name="favgroup" draworder="4" align="left"> <area>0,0,240,30</area> <font>info</font> </textarea> </container> Adjust area accordingly.

textarea name should be "changroup"...

<container name="channel_group">
 <area>15,15,450,30</area>
 <textarea name="changroup" draworder="1" align="left">
 <area>0,0,440,30</area>
 <font>green2_big</font>
 </textarea>
</container>

comment:31 Changed 11 years ago by Bill <level42@…>

oh do I feel sheepish, thanks for posting corrections to my stupid errors.

I'm updating the patch for SVN (multirec) but the change impacts are substantial and will take me a week to update and test.

Changed 11 years ago by Bill <level42@…>

Attachment: channelgroup.2.diff added

Updated for SVN15504

comment:32 Changed 11 years ago by Bill <level42@…>

Patch has been updated for SVN 15504. If you haven't done so already two tables need be created: CREATE TABLE IF NOT EXISTS channelgroupnames (grpid int(10) unsigned NOT NULL auto_increment,name varchar(64) NOT NULL default ,PRIMARY KEY (grpid));

CREATE TABLE IF NOT EXISTS channelgroup (id int(10) unsigned NOT NULL auto_increment, chanid int(11) unsigned NOT NULL default '0', grpid int(11) NOT NULL default '1', PRIMARY KEY (id));

And if you want to show the channel group name in the guide, add this to ui.xml in the program guide windows. <container name="channel_group">

<area>15,15,450,30</area> <textarea name="changroup" draworder="1" align="left"> <area>0,0,440,30</area> <font>green2_big</font> </textarea>

</container>

comment:33 Changed 11 years ago by jmwislez@…

This is the one feature I am waiting for in 0.21, so I hope it will be included. I have a few suggestions/ideas, but they should in no way delay the inclusion in 0.21.

On could also create a table four classes of channel groups:

CREATE TABLE channelgroupclasses (

classid int(11) unsigned NOT NULL auto_increment, name varchar(20) NOT NULL, PRIMARY KEY (classid)

) ;

and add "classid" to channelgroupnames.

This would allow to re-group the channel groups into logical classes, and possibly also to store some automatically gathered meta-data about the channels (e.g. taken from DVB-S) in an orderly manner. An example:

Transmission type: (channel group class)

  • TV (channel group)
  • HDTV (...)
  • Radio
  • Data

Language: (...)

  • English
  • ...

Country:

  • ...

Channel type:

  • News
  • Movies
  • Advertisements
  • ...

Attribute:

  • Teletext
  • Digital Dolby
  • Subtitles
  • Duplicate
  • ...

Especially for satellite systems where hundreds of channels are available this would be very useful.

I am willing to try to help implement features to support this through mythweb (I only know some php), but I do not want to destabilize my myth box and I do not have a separate development machine available. Is there a way to have both on the same machine?

comment:34 Changed 11 years ago by stuartm

Milestone: unknown0.22

comment:35 Changed 11 years ago by stuartm

There just isn't time to give this patch the testing it requires before 0.21. I will get this in trunk soon afterwards and hope that a 0.22 release follows pretty quickly.

comment:36 Changed 11 years ago by Bill <level42@…>

Agreed, just to add it needs more than just testing. Some code clean-up outside of the patch as mentioned previously in the ticket is needed to complete the patch. This is mainly to do with the existing favorite code that needs to be removed or replaced. I didn't want to bother with that until it had been reviewed in case other re-work was needed.

I am willing to work with you to complete this patch, I'll try my best to support you re-coding any parts as you would like to see it.

comment:37 Changed 11 years ago by marcus@…

Hello,

sorry for the questioning inside this ticket. But I'm searching for a long time on a solution like this ;)

I'm a DBox2 Neutrino user so I'm addicted to different Bouquet's (or favorite listings).

Here's my question.

Do I need to patch the MythTV source an recompile MythTV or can I patch an installed MythTV with this ?

Best regards

Marcus

comment:38 Changed 11 years ago by Bill <level42@…>

Yes you need to patch the source and recompile. In the future please direct your questions to the appropriate list mythtv-users@… or mythtv-dev@…

comment:39 Changed 11 years ago by Mark Buechler <Mark.Buechler@…>

Just a note on this patch. If a given channel is in more than one guide group, it will get duplicated in ChannelUtil::GetChannels?(). A "DISTINCT(channel.chanid)" should be added to the SQL query.

  • Mark.

comment:40 Changed 11 years ago by psofa

just an idea on this.Except from xmltv info the channels could also be automatically grouped based on their provider id.Doesnt dvb-s(-t -c ?) stream contain such stuff?My dreambox does such things auto.

comment:41 Changed 11 years ago by stuartm

Status: startedassigned

comment:42 Changed 11 years ago by wstewart@…

Stuartm: I'll be updating my patch (which is the channelgroup patch) for trunk shortly. Would you mind looking at the current patch and tell me what I should change to move to mythui if anything.

comment:43 Changed 11 years ago by satfan39@…

Can someone give me the syntax of the detailed command to use to apply this patch to the current svn. I use the " patch -p1 <" command on the current svn but the result is not ok.

Thanks

satfan39@satfan39-desktop:~/Bureau/svn-unstable/trunk/mythtv/libs/libmythtv$ sudo patch -p1 < /home/satfan39/Bureau/down/channelgroup.2.diff patching file libs/libmythtv/channelgroup.cpp patching file libs/libmythtv/channelgroup.h can't find file to patch at input line 469 Perhaps you used the wrong -p or --strip option? The text leading up to this was:


|diff -Naur --exclude='*.orig' --exclude='*.rej' mythtv-orig/libs/libmythtv/channelutil.cpp mythtv/libs/libmythtv/channelutil.cpp

mythtv-orig/libs/libmythtv/channelutil.cpp 2008-01-19 00:55:16.000000000 -0500

|+++ mythtv/libs/libmythtv/channelutil.cpp 2008-01-19 11:42:36.000000000 -0500


File to patch:

comment:44 Changed 11 years ago by wstewart@…

I am currently updating the patch to SVN. I've updated it and will post it after I have tested it. Sorry the current patch attached to the ticket was for 0.21-fixes and won't apply to trunk.

Would you please post such messages requesting help to the dev list rather than the ticket. Thank you.

comment:45 Changed 11 years ago by wstewart@…

Updated for trunk. Needs #5830 to update in the guide properly.

Still to do, convert popups in guide to mythui and remove favorites code from remoteencoder.cpp/encoderlink.cpp and tv_rec.cpp.

Note that the channel group selected can be displayed in the guide by modifying ui.xml, see above.

Changed 11 years ago by wstewart@…

Attachment: channelgroup.3.diff added

updated for trunk, see comment. Will not work with 0.21-fixes.

Changed 11 years ago by Matthew Wire <devel@…>

Attachment: 01-199-channelgroup.4.diff added

Update so it compiles. Was missing <algoritm> header

Changed 10 years ago by Matthew Wire <devel@…>

Minor compile fix to guidegrid.h since headers have been rearranged

comment:46 Changed 10 years ago by anonymous

Does not compile against current version of trunk ( Jan 09 ). Please indicate what trunk version this should be tested against. Thanks

comment:47 in reply to:  46 Changed 10 years ago by satfan39

Replying to anonymous:

Does not compile against current version of trunk ( Jan 09 ). Please indicate what trunk version this should be tested against. Thanks

Compiled and tested ok against trunk version 19395. Would it be possible to have an update version of the patch for the current version of trunk ( 19814 ) ?

Changed 10 years ago by bander.ajba@…

Attachment: changroups.19873.diff added

patch for trunk svn 19873

Changed 10 years ago by bander.ajba@…

Attachment: changroups.19873.2.diff added

ignore the previous patch. this one works -- trunk svn 19873

Changed 10 years ago by bander.ajba@…

Attachment: changroups.19873.3.diff added

ignore the previous patch. this one works -- trunk svn 19873

comment:48 Changed 10 years ago by anonymous

The patch applied without errors to r19873, but gave a couple of errors when compiled:

/usr/include -I/usr/local/include -I/usr/X11R6/include -I. -I. -o previouslist.o previouslist.cpp In file included from NuppelVideoPlayer?.h:17,

from customedit.h:8, from previouslist.cpp:25:

tv_play.h:28:26: error: channelgroup.h: No such file or directory In file included from NuppelVideoPlayer?.h:17,

from customedit.h:8, from previouslist.cpp:25:

tv_play.h:757: error: ‘ChannelGroupList?’ does not name a type make[2]: * [previouslist.o] Error 1 make[2]: Leaving directory `/home/chris/MythBuilder/trunk/mythtv/libs/libmythtv' make[1]: * [sub-libmythtv-make_default] Error 2 make[1]: Leaving directory `/home/chris/MythBuilder/trunk/mythtv/libs' make: * [sub-libs-make_default-ordered] Error 2

comment:49 Changed 10 years ago by bander.ajba@…

the posted diff file was generated using svn diff mythtv which only generates diffs for files that are part of svn tree only. however this ticket uses two more files that are not part of the svn tree.

Please someone tell me how to generate a diff to include files that are not part of the svn tree.

Changed 10 years ago by bander.ajba@…

Attachment: channgroup.tar added

please untar this file in mythtv/libs/libmythtv in order for the previous patch (changroup.19873.3.diff) to work

comment:50 Changed 10 years ago by wstewart@…

I used diff -Naurp to generate the original patches. I do it against a local copy of svn on my system.

comment:51 Changed 10 years ago by anonymous

Myth compiled and installed fine with the patch and the channgroup file in place, it upgraded the schema for mythconverg and I can watch live tv! Channel Groups shows up under Program Guide in the OSD. Great progress.

I used setup - Channel Groups to name a group and pick some channels, but I get this in the terminal:

2009-02-07 11:14:10.251 DB Error (ChannelGroup::ToggleChannel?): Query was: SELECT channelgroup.id FROM channelgroup WHERE channelgroup.chanid = ? AND channelgroup.grpid = ? LIMIT 1 Bindings were: :CHANID=1122, :GRPID=72 Driver error was [2/1146]: QMYSQL3: Unable to prepare statement Database error was: Table 'mythconverg.channelgroup' doesn't exist

2009-02-07 11:14:10.256 DB Error (ChannelGroup::GetChannelGroups?): Query was: SELECT grpid, name FROM channelgroupnames Driver error was [2/1146]: QMYSQL3: Unable to prepare statement Database error was: Table 'mythconverg.channelgroupnames' doesn't exist

2009-02-07 11:14:23.269 Received a remote 'Clear Cache' request

Am I missing something?

comment:52 Changed 10 years ago by anonymous

Further to my post above:

I found the table creation instructions in the middle of this thread, (13 months ago) and tried them. The first worked fine:

mysql> CREATE TABLE IF NOT EXISTS channelgroup (id int(10) unsigned NOT NULL auto_increment, chanid int(11) unsigned NOT NULL default '0', grpid int(11) NOT NULL default '1', PRIMARY KEY (id)); Query OK, 0 rows affected, 1 warning (0.00 sec)

But the second did not (I tried all the suggested code in this thread, and some of my own):

mysql> CREATE TABLE IF NOT EXISTS channelgroupnames (grpid int(10) unsigned NOT NULL auto_increment,name varchar(64) NOT NULL default ,PRIMARY KEY (grpid)); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PRIMARY KEY (grpid))' at line 1

comment:53 in reply to:  52 Changed 10 years ago by sphery <mtdean@…>

Replying to anonymous:

Further to my post above:

Please post questions/comments about the patch to the mailing list. The bug database is not a support or discussion forum.

Thanks, Mike

Changed 10 years ago by Matthew Wire <devel@…>

Update for SVN19972

comment:54 in reply to:  52 Changed 10 years ago by anonymous

Replying to anonymous:

Further to my post above:

I found the table creation instructions in the middle of this thread, (13 months ago) and tried them. The first worked fine:

mysql> CREATE TABLE IF NOT EXISTS channelgroup (id int(10) unsigned NOT NULL auto_increment, chanid int(11) unsigned NOT NULL default '0', grpid int(11) NOT NULL default '1', PRIMARY KEY (id)); Query OK, 0 rows affected, 1 warning (0.00 sec)

But the second did not (I tried all the suggested code in this thread, and some of my own):

mysql> CREATE TABLE IF NOT EXISTS channelgroupnames (grpid int(10) unsigned NOT NULL auto_increment,name varchar(64) NOT NULL default ,PRIMARY KEY (grpid)); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PRIMARY KEY (grpid))' at line 1

There is an obvious error in channelgroupnames table creation, the correct syntax is :

CREATE TABLE IF NOT EXISTS channelgroupnames (grpid int(10) unsigned NOT NULL auto_increment,name varchar(64) NOT NULL default '0',PRIMARY KEY (grpid));

default '0' NOT default

Changed 10 years ago by Matthew Wire <devel@…>

Update for 20043 and remove obsolete favorites code

Changed 10 years ago by Matthew Wire <devel@…>

DB update for 20043

Changed 10 years ago by Matthew Wire <devel@…>

Update for svn 20153

Changed 10 years ago by Matthew Wire <devel@…>

Update for svn. Do not use the previous dbcheck patch since it creates the wrong tables. This one is correct

Changed 10 years ago by Matthew Wire <devel@…>

Refresh against 20301

comment:55 Changed 10 years ago by stuartm

Milestone: 0.220.23

Changed 10 years ago by wstewart@…

Attachment: channelgroup.4.diff added

Updated for SVN 20401

comment:56 Changed 10 years ago by wstewart@…

Updated for SVN 20401, won't work for 0.21-fixes. A number of updates and optimizations to the code; updated myth protocol favorite command to include group name. If incorporated to SVN, myth protocol version needs to be bumped up. This portion of code is untested.

Patches wide version of guide to include channel group name in guide.

One issue; haven't figure way out to pass back channel group selected in guide back to the tv player to use for channel browsing.

comment:57 in reply to:  56 Changed 10 years ago by satfan39

Replying to wstewart@hgrace.com:

Updated for SVN 20401, won't work for 0.21-fixes. A number of updates and optimizations to the code; updated myth protocol favorite command to include group name. If incorporated to SVN, myth protocol version needs to be bumped up. This portion of code is untested.

Patches wide version of guide to include channel group name in guide.

One issue; haven't figure way out to pass back channel group selected in guide back to the tv player to use for channel browsing.

The patch applies cleanly in my environment with trunk 20401 but it produces a compiling in µmy environment ( ubuntu Intrepid kernel 2.6.27-14 )

tv_play.o: In function `TV::Init(bool)': tv_play.cpp:(.text+0x9347b): undefined reference to `ChannelGroup::GetChannelGroups?()' tv_play.o: In function `std::vector<ChannelGroupItem?, std::allocator<ChannelGroupItem?> >::operator=(std::vector<ChannelGroupItem?, std::allocator<ChannelGroupItem?> > const&)': tv_play.cpp:(.text._ZNSt6vectorI16ChannelGroupItemSaIS0_EEaSERKS2_[std::vector<ChannelGroupItem, std::allocator<ChannelGroupItem> >::operator=(std::vector<ChannelGroupItem, std::allocator<ChannelGroupItem> > const&)]+0x9c): undefined reference to `ChannelGroupItem::ChannelGroupItem?(ChannelGroupItem? const&)' tv_play.cpp:(.text._ZNSt6vectorI16ChannelGroupItemSaIS0_EEaSERKS2_[std::vector<ChannelGroupItem, std::allocator<ChannelGroupItem> >::operator=(std::vector<ChannelGroupItem, std::allocator<ChannelGroupItem> > const&)]+0x176): undefined reference to `ChannelGroupItem::operator=(ChannelGroupItem? const&)' tv_play.cpp:(.text._ZNSt6vectorI16ChannelGroupItemSaIS0_EEaSERKS2_[std::vector<ChannelGroupItem, std::allocator<ChannelGroupItem> >::operator=(std::vector<ChannelGroupItem, std::allocator<ChannelGroupItem> > const&)]+0x1f6): undefined reference to `ChannelGroupItem::operator=(ChannelGroupItem? const&)' tv_play.cpp:(.text._ZNSt6vectorI16ChannelGroupItemSaIS0_EEaSERKS2_[std::vector<ChannelGroupItem, std::allocator<ChannelGroupItem> >::operator=(std::vector<ChannelGroupItem, std::allocator<ChannelGroupItem> > const&)]+0x254): undefined reference to `ChannelGroupItem::ChannelGroupItem?(ChannelGroupItem? const&)' tv_rec.o: In function `TVRec::ToggleChannelFavorite?(QString)': tv_rec.cpp:(.text+0x2d6a): undefined reference to `ChannelGroup::GetChannelGroupId?(QString)' tv_rec.cpp:(.text+0x2d9d): undefined reference to `ChannelGroup::ToggleChannel?(unsigned int, int, int)' collect2: ld a retourné 1 code d'état d'exécution make[2]: * [libmythtv-0.22.so.0.22.0] Erreur 1 make[2]: quittant le répertoire « /usr/src/trunk-20401/mythtv/libs/libmythtv » make[1]: * [sub-libmythtv-make_default] Erreur 2 make[1]: quittant le répertoire « /usr/src/trunk-20401/mythtv/libs » make: * [sub-libs-make_default-ordered] Erreur 2

comment:58 Changed 10 years ago by wstewart@…

sorry patch is missing portion for make file. Working on an update for current trunk, will post when stupid compiler quits crashing my computer.

Changed 10 years ago by wstewart@…

Attachment: channelgroup.5.diff added

Updated for SVN 20471

comment:59 Changed 10 years ago by wstewart@…

Updated patch for SVN 20471

comment:60 Changed 10 years ago by paulh

Milestone: 0.230.22
Owner: changed from stuartm to paulh

Going to try and get this in before 0.22

comment:61 Changed 10 years ago by chris.hembrow_myth@…

In the UK we have groups of channels which show current seasons of programs (i.e. Sky One, Sky Two, Sky Three), but there are channels which shows old seasons of the program (i.e. Gold, Gold +1).

At the moment the only options available are "this channel" or "any channel". What I want is the ability to create a channel group called "SKY", and say record at "any time on group SKY". This would ensure that I get the new episodes, but exclude old episodes which sometimes get picked up at the moment.

Would this patch allow me to do this?

comment:62 Changed 10 years ago by wstewart@…

Chris, I appreciate your question, but please do not use the ticket for discussion, this not the place, use the user or dev list. Ask the question there please.

comment:63 in reply to:  59 Changed 10 years ago by satfan39

Replying to wstewart@hgrace.com:

Updated patch for SVN 20471

Sorry but it does not compile yet in my environment ( ubuntu intrepid kernel 2.6.27-14 ). The patch applied cleanly with trunk svn 20471 but I have the following error below. I used : ./configure --prefix=/usr --disable-ssse3 --enable-proc-opt --enable-xvmc-opengl --enable-opengl-vsync --dvb-path=/usr/src/s2/s2-liplianin-2866ecb5e66b/linux/include --disable-firewire --enable-vdpau

g++ -c -pipe -march=core2 -fomit-frame-pointer -O3 -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -funit-at-a-time -DSTDC_CONSTANT_MACROS -I/usr/include/directfb -D_REENTRANT -I/usr/include/freetype2 -D_REENTRANT -DPIC -fPIC -DMMX -Di386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUSING_OSS -DUSING_DIRECTFB -DUSING_X11 -DUSING_XV -DUSING_XVMC -DUSING_XVMCW -DUSING_XVMC_VLD -DUSING_VDPAU -DUSING_OPENGL -DUSING_OPENGL_VSYNC -DUSING_OPENGL_VIDEO -DUSING_MHEG -DUSING_FRONTEND -DUSING_FFMPEG_THREADS -DUSING_V4L -DUSING_IPTV -DUSING_HDHOMERUN -DUSING_IVTV -DUSING_HDPVR -DUSING_DVB -DUSING_BACKEND -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtSql -I/usr/include/qt4 -I../../../../s2/s2-liplianin-2866ecb5e66b/linux/include -I.. -I../.. -I. -I../libmyth -I../libavcodec -I../libavformat -I../libavutil -I../libswscale -I../libmythmpeg2 -I../libmythdb -I../libmythhdhomerun -I../libmythdvdnav -Idvbdev -Impeg -Iiptv -Ichannelscan -I../libmythlivemedia/BasicUsageEnvironment/include -I../libmythlivemedia/BasicUsageEnvironment -I../libmythlivemedia/groupsock/include -I../libmythlivemedia/groupsock -I../libmythlivemedia/liveMedia/include -I../libmythlivemedia/liveMedia -I../libmythlivemedia/UsageEnvironment/include -I../libmythlivemedia/UsageEnvironment -I../libmythdb -I../libmythui -I/usr/include -I/usr/X11R6/include -I. -I. -o channelgroup.o channelgroup.cpp channelgroup.cpp: In static member function ‘static int ChannelGroup::GetNextChannelGroup?(const ChannelGroupList?&, int)’: channelgroup.cpp:179: erreur: no matching function for call to ‘find(gnu_cxx::normal_iterator<const ChannelGroupItem?*, std::vector<ChannelGroupItem?, std::allocator<ChannelGroupItem?> > >, gnu_cxx::normal_iterator<const ChannelGroupItem?*, std::vector<ChannelGroupItem?, std::allocator<ChannelGroupItem?> > >, int&)’ make[2]: * [channelgroup.o] Erreur 1 make[2]: quittant le répertoire « /usr/src/trunk-20471/mythtv/libs/libmythtv » make[1]: * [sub-libmythtv-make_default] Erreur 2 make[1]: quittant le répertoire « /usr/src/trunk-20471/mythtv/libs » make: * [sub-libs-make_default-ordered] Erreur 2

comment:64 Changed 10 years ago by paulh

Ticket locked: set

comment:65 Changed 10 years ago by paulh

Resolution: fixed
Status: assignedclosed

(In [20523]) Add channel grouping feature that allows you to create groups of channels to help to find a channel while in live tv or the EPG.

  • There's a new 'Channel Groups' settings page where you can add/delete the groups and also to change what channels appear in a group.
  • While watching live tv you can select which channel group is active from the menu. When a group is selected and the current channel isn't in the group then the player will switch to the first channel in that group. Browsing in the OSD and changing channels will be restricted to channels from the current group.
  • If you switch to the EPG from live tv the EPG will only show channels from the current channel group.
  • In the EPG you can change the current group from the menu or you can cycle though the groups by pressing NEXFAV ('/').
  • If you are viewing all the channels in the EPG you add the current channel to a channel group from the menu or by pressing TOGGLEFAV ('?').
  • If you are viewing channels in a group in the EPG you can remove the current channel from the group via the menu or by pressing TOGGLEFAV ('?').
  • A channel group called 'Favorites' is created and any existing favorites are placed in that group.
  • Bumps the protocol version to 45.

Thanks to all who contributed to the patch on the ticket. I've made a few changes to the patch so any bugs are mine. Closes #199.

Note: See TracTickets for help on using tickets.