2014-06-25, 04:23
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!).
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
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