Difference between revisions of "Creating a TV Bouquet"

From MythTV Official Wiki
Jump to: navigation, search
(Create a menu ui item for these bouquets)
m (file templates)
Line 1: Line 1:
 
[[Category:HOWTO]]
 
[[Category:HOWTO]]
  
These days with a lot of Satellites providing 100's of channels and having multiple satellites connected to your MythTV it becomes very tedious to browse thru the various channels to get to the ones you want to watch. Settop boxes provide Bouquets which let you categorize your  channels into favorites for you and your family. This doc provides a means of setting up manually 2 different bouquets (as an example) for your wife and your kids. This also lets you hide unwanted channels from others.
+
These days with a lot of Satellites providing 100's of channels and having multiple satellites connected to your MythTV it becomes very tedious to browse through the various channels to get to the ones you want to watch. Settop boxes provide Bouquets which let you categorize your  channels into favorites for you and your family. This doc provides a means of setting up manually 2 different bouquets (as an example) for your wife and your kids. This also lets you hide unwanted channels from others.
  
 
== Get a list of all channels ==
 
== Get a list of all channels ==
Line 21: Line 21:
  
 
The following script (which we will call ''''changebouquet'''' and also place in the /home/mythtv/scripts directory) needs to be created.
 
The following script (which we will call ''''changebouquet'''' and also place in the /home/mythtv/scripts directory) needs to be created.
 
+
{{Box File|/home/mythtv/scripts/changebouquet.sh|
 +
<pre>
 
  #!/bin/bash
 
  #!/bin/bash
 
  CPATH=/home/mythtv/scripts
 
  CPATH=/home/mythtv/scripts
Line 38: Line 39:
 
   mysql -e 'update channel set visible=1;' mythconverg
 
   mysql -e 'update channel set visible=1;' mythconverg
 
  fi
 
  fi
+
</pre>
 +
}}
 
Make the script executable
 
Make the script executable
 
  $ chmod +x /home/mythtv/scripts/changebouquet
 
  $ chmod +x /home/mythtv/scripts/changebouquet
Line 50: Line 52:
  
 
Next open the file ''/usr/share/mythtv/tvmenu.xml'' with a text editor (as root) and put the following section somewhere in between another <button> block where you'd like it to appear.
 
Next open the file ''/usr/share/mythtv/tvmenu.xml'' with a text editor (as root) and put the following section somewhere in between another <button> block where you'd like it to appear.
 +
{{Box File|/usr/share/mythtv/tvmenu.xml|
 +
<pre>
 +
...
  
 
     <button>
 
     <button>
Line 67: Line 72:
 
     </button>
 
     </button>
  
EDIT: Fixed a typo wich will hang or restart the frontend. </action> was </text> fixed now. Nice howto works nice, thumps Up
+
...
 +
</pre>
 +
}}
 +
EDIT: Fixed a typo which will hang or restart the frontend. </action> was </text> fixed now. Nice howto works nice, thumps Up
  
 
== Use the new bouquet ==
 
== Use the new bouquet ==

Revision as of 02:15, 22 March 2007


These days with a lot of Satellites providing 100's of channels and having multiple satellites connected to your MythTV it becomes very tedious to browse through the various channels to get to the ones you want to watch. Settop boxes provide Bouquets which let you categorize your channels into favorites for you and your family. This doc provides a means of setting up manually 2 different bouquets (as an example) for your wife and your kids. This also lets you hide unwanted channels from others.

Get a list of all channels

The first step once you have all your satellite channels scanned is to connect to the database and dump all channels to a text file like so:

$ mysql -s -e 'select chanid,name from channel'  mythconverg >all.chan

I'm assuming you have the 'user' and 'password' setup in your [client] section in /etc/my.cnf or ~/.my.cnf for the mythtv user so you don't have to provide a user or pass on the command line.

This should give you a list in the file 'all.chan' of all the channels you have

Create the bouquet of channels

Next extract from the 'all.chan' file, with a text editor, all the channels for your wife and kids and create separate files - lets call these files 'wife.chan' and 'kids.chan'

I put all these files in /home/mythtv/scripts (along with other scripts) but you may chose your location.

Create a bouquet changing script

The following script (which we will call 'changebouquet' and also place in the /home/mythtv/scripts directory) needs to be created. Template:Box File Make the script executable

$ chmod +x /home/mythtv/scripts/changebouquet

Create a menu ui item for these bouquets

Next you can either create a menu item in the TV menu or assign a button on your remote to do the same thing. Here i will assign three menu items. One for the wife, one for the kids and the last is to revert back to all channels which gives you back all your channels as before

First make a copy of the menu

$ cp /usr/share/mythtv/tvmenu.xml ~/tvmenu.xml.orig

Next open the file /usr/share/mythtv/tvmenu.xml with a text editor (as root) and put the following section somewhere in between another <button> block where you'd like it to appear. Template:Box File EDIT: Fixed a typo which will hang or restart the frontend. </action> was </text> fixed now. Nice howto works nice, thumps Up

Use the new bouquet

Restart the frontend and start surfing your bouquet ! You should now be able to see your bouquet in the TV menu.

You can extend the script to automatically jump to watching tv with your new bouquet if you have the Telnet_socket interface by just adding the line

echo jump livetv | telnet localhost 6546

to the end of the 'changebouquet' script shown above