2014-10-01, 20:45
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.
yields...
Anyone seeing what I'm messing up?
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?