[RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...)
Ok, worked partially: plugin now controls my lights, but also dims when I play music. I'm still tryintg to figure out how to run the script on video only, but at least it's doing something today it wasn't doing yesterday. :-)

As for distinguishing between music and video: is it right to assume that it's not possible to pass a parameter to sh? Because that was my conclusion after a couple of hours of tinkering.

So I tried making a python-script, which checks the media and then points towards the bash. Obviously it's not working, my python-knowledge is close to zero.

Code:
#!/usr/bin/env python

import sys
if  not  'music' in sys.argv[1]:
   import subprocess
   subprocess.call([./blauw.sh']
0

yields...

Code:
File "blauw2.py", line 6
    subprocess.call([./blauw.sh']
                     ^
SyntaxError: invalid syntax

Anyone seeing what I'm messing up?
Reply


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