I've made a menu item for mythtv

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
xbmcn00b Offline
Member
Posts: 57
Joined: Aug 2009
Reputation: 0
Post: #1
Hi,

I'm using the Aeon theme, on linux, with xbmc from the repo, ubuntu 9.04

From the information on this forum i've created a python script to launch mythtv from the main menu, now this works and gets me to the mythfrontend but when i select Watch TV on the myth menu it plays behind the other windows. It can't get focus? It will sometimes randomly get focus.

I know mythfrontend works ok i can launch it without xbmc and it works fine.

Is there another way to get focus over xbmc? I need the mythfrontend to load so i can get to the recordings and setup, i just prefer playing managing that data through mythtv.

Here is my python script, i've tried mythfrontend and mythfrontend.real

#!/usr/bin/python
import os
cmd = 'mythfrontend.real > /tmp/mythfrontend.log 2>&1 &'
os.system(cmd)

and my menu entry
<item id="21">
<description>TV</description>
<label>TV</label>
<onclick>XBMC.RunScript(/home/user/.xbmc/scripts/startmyth.py)</onclick>
<visible>Skin.HasSetting(assistant)</visible>
</item>

Any help would be great, thank you.
find quote
xbmcn00b Offline
Member
Posts: 57
Joined: Aug 2009
Reputation: 0
Post: #2
going to install latest version of xbmc see if that makes any difference, otherwise i might have to go straight to mythtv from the menu and load in myth:// source to xbmc and run the commerical skipping patch so EDL works ok.
find quote
grantek Offline
Junior Member
Posts: 1
Joined: Oct 2009
Reputation: 0
Post: #3
Hi - thanks for your code snippet, I took the idea and modified it to disable LIRC in xbmc before running the command - I have:
Code:
#!/usr/bin/python
import os
import xbmc

cmd = 'mythfrontend > /tmp/mythfrontend.log 2>&1'

xbmc.executebuiltin("LIRC.Stop")
os.system(cmd)
xbmc.executebuiltin("LIRC.Start")
and it works well Smile
find quote