[RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...)
#83
(2014-02-22, 20:19)metheos Wrote:
(2014-02-21, 02:02)metheos Wrote: Great add on! It does what I needed just fine. My only nitpick is that the script I put into the xbmc start option gets abandoned after exiting and shows up on the process list as a zombie! Not a big deal, but it would be nice if that didn't happen.

I was able to get this to work by adding a wait to the process and pointing it to a script that forks the actual script.
Code:
class Main:
  def __init__(self):
    self._init_vars()
    self._init_property()
    global script_xbmc_starts
    if script_xbmc_starts:
      log('Going to execute script = "' + script_xbmc_starts + '"')
      try:
          process= subprocess.Popen([script_xbmc_starts])
          process.wait()
      except:
          log('Error executing script when xbmc starts')
    self._daemon()

Thanks for this, to be honest it does not happen in my setup (raspbmc) but I will investigate further. Regards,
Reply


Messages In This Thread
Great! - by gnorf - 2013-02-27, 22:50
RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - by pilluli - 2014-02-22, 21:09
[RELEASE] Pilulli Revisited - by KenV99 - 2014-06-28, 18:18
Logout Mark Read Team Forum Stats Members Help
[RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...)4