[RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...)
Thanks so much for your help pilluli.

I made this .py file, called it resumeandstart.py, and have it execute when "Play Starts" and when "Player Resumes". Any reason why it isn;'t working? I'm sure something is wrong with my code, just don't know what it is (as you can tell i have never used python before!).

Code:
#!/usr/bin/env python

import sys
import subprocess

if  'music' in sys.argv[1]:
subprocess.call(["/home/xbmc/.xbmc/scripts/lightson.sh"])

if  'video' in sys.argv[1]:
subprocess.call(["/home/xbmc/.xbmc/scripts/lightsoff.sh"])

If i get your addon to run lightsoff.sh and lightson.sh instead of this middle man .py file, they execute fine. I suspect something is wrong with my python coding.
Thanks so much
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 invision - 2014-06-25, 04:23
[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