
steve at priorityelectronics
Mar 14, 2008, 2:56 PM
Views: 1004
Permalink
|
|
using telnet to improve mythtv menus
|
|
Hello all, I had the idea lately to use telnet to improve my mythtv menu. I've got lots of recordings that i've been archiving away, like season series (all from live tv recordings). I wanted to clean up the watch recordings screen so that we could choose from the menu which type of recordings to view (we have "myth wish", "default", and "archived" as the options) I checked out this page in the wiki: http://www.mythtv.org/wiki/index.php/Creating_a_TV_Bouquet to help me with my ideas. When you hit watch recordings it now goes to an xml menu that has 3 options: watch recordings new recordings tv show archives The xml file looks like this: ____________________________________________ <mythmenu name="MAIN"> <button> <type>TV_WATCH_RECORDINGS</type> <text>All Recordings</text> <action>TV_WATCH_RECORDING</action> </button> <button> <type>TV_WATCH_RECORDINGS</type> <text>New Recordings</text> <action>EXEC /home/steve/Desktop/mythscripts/newrecordings.sh</action> </button> <button> <type>TV_WATCH_RECORDINGS</type> <text>TV Show Archives</text> <action>EXEC /home/steve/Desktop/mythscripts/archivedrecordings.sh</action> </button> </mythmenu> ____________________________________________ The newrecordings.sh file looks like this: #!/bin/bash #This takes you to the New (Default) Recordings echo "jump playbackbox" | telnet 192.168.1.3 6546 echo "key n" | telnet 192.168.1.3 6546 #sleep is used cause it takes a while to get into the watch recordings view sleep 2 echo "key enter" | telnet 192.168.1.3 6546 #again, sleep is used incase it takes time to pop up the menu sleep 0.5 #Pageup brings you to the top of the menu echo "key pageup" | telnet 192.168.1.3 6546 echo "key pageup" | telnet 192.168.1.3 6546 echo "key pageup" | telnet 192.168.1.3 6546 #down down get's you to default echo "key down" | telnet 192.168.1.3 6546 echo "key down" | telnet 192.168.1.3 6546 echo "key enter" | telnet 192.168.1.3 6546 exit 0 My issue is that it doesn't seem to work from the myth gui, but works perfectly from the command line. If I can get this to work, i'll create more menues so i can do something like this: TV Show Archives > The Simpsons > Season 1 Then i'll do a movies one where you can choose the genre right in the xml menu file. I just find this easier than pressing the "n" button ("enter" on my remote), and i think the waf factor will go way up, especially for the movies, cause we have a couple hundred movies and it's often hard to find a movie to watch. Any ideas? -Thanks -Steve
|