[mythtv-commits] Ticket #199: multiple favorite channel groups
MythTV
mythtv at cvs.mythtv.org
Sat Oct 6 06:31:48 UTC 2007
#199: multiple favorite channel groups
-------------------------+--------------------------------------------------
Reporter: xris | Owner: stuartm
Type: enhancement | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: head
Severity: medium | Resolution:
Mlocked: 0 |
-------------------------+--------------------------------------------------
Comment(by maverik044 <level42 at sympatico.ca>):
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.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/199#comment:13>
MythTV <http://svn.mythtv.org/trac>
MythTV
More information about the mythtv-commits
mailing list