[mythtv-users] using telnet to improve mythtv menus

Paul Bender pebender at san.rr.com
Sat Mar 15 04:32:41 UTC 2008


Steve Peters - Priority Electronics wrote:
>>>  
>>> My issue is that it doesn't seem to work from the myth gui, but works
>>> perfectly from the command line.
>> To resolve it, you have to have the script run in the background, so 
>> that the menu processing completes before the script finishes running.
>>
>> Here is the script that I use to show the "Kids" recgroup:
>>
>> #!/bin/bash
>> echo "jump playbackrecordings
>> key down down enter
>> quit" | nc localhost 6546 &
>>
>> The & at the end runs it in the background, so that the script exits 
>> before netcat does.
>>
>> Note that I have myth configured to show the recgroup selector 
>> always on 
>> entry to the playback recording screen, to avoid the delay required to 
>> bring up the popup menu.
>>
>> - Marc
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> 
> 
> 
> Marc, thanks for the reply. Ok, I tried to do what you're doing, but it just
> didn't work. So then I thought, what if my script just called another
> script, so now I have archivedrecordings.sh and archivedrecordingsrun.sh
> 
> Now the script I made works, but 1 out of 5 times, myth takes longer to open
> the recorded tv module (usually it takes about 4 seconds, but sometimes up
> to 6-7 seconds on my fast core 2 duo). So on the time it takes 6-7 seconds,
> my script ends up making a recording start playing. It seems as though since
> myth is taking a long time, the "key n" command is ignored, and the "down
> down enter" command is received. So it plays the third recording on the
> list.
> 
> Any ideas on how to address this one? Really strange.

What I do in MiniMyth is use the telnet interface to query the location 
using a shell script netpipes' hose. I have attached a snippet of the 
script as an example. 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: snippet.sh.gz
Type: application/x-gzip
Size: 519 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20080314/1ce31d43/attachment.bin 


More information about the mythtv-users mailing list