[RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...)
(2014-10-04, 19:35)tehKNi Wrote:
(2014-10-04, 19:30)KenV99 Wrote: Are you checking off 'requires shell' in the options and only including '/storage/hyperion/stop.sh' as script that you are executing?

Nop, i checked.
When i didn't check i had another error (that was longer :p)

Code:
19:43:08 T:2891072592  NOTICE: $$$ xbmc.callbacks2 - Starting tester.py from cwd: /storage/.xbmc/addons/service.xbmc.callbacks2-allincluded
19:43:10 T:2891072592  NOTICE: $$$ [xbmc.callbacks2] - Executing command: [[u'/storage/hyperion/stop.sh']] for event: onPlaybackStarted
19:43:10 T:2891072592  NOTICE: $$$ [xbmc.callbacks2] - Command for onPlaybackStarted resulted in ERROR: <attribute 'message' of 'exceptions.BaseException' objects>
                                            Traceback (most recent call last):
                                              File "/storage/.xbmc/addons/service.xbmc.callbacks2-allincluded/default.py", line 472, in run
                                                result = subprocess.check_output(margs, shell=self.needs_shell, stderr=subprocess.STDOUT)
                                              File "/home/stephan/projects/openelec-4.2/build.OpenELEC-RPi.arm-4.2.1/Python-2.7.3/.install_pkg/usr/lib/python2.7/subprocess.py", line 537, in check_output
                                              File "/home/stephan/projects/openelec-4.2/build.OpenELEC-RPi.arm-4.2.1/Python-2.7.3/.install_pkg/usr/lib/python2.7/subprocess.py", line 679, in __init__
                                              File "/home/stephan/projects/openelec-4.2/build.OpenELEC-RPi.arm-4.2.1/Python-2.7.3/.install_pkg/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
                                            OSError: [Errno 2] No such file or directory

But that may be interesting anyway, yeah ;-)
In both cases it cannot find the file. I don't have a pure linux system to test on, but it behaves properly for others and works for me on Android.
You might try moving your script to the add on directory and see if it will run from there.
If that doesn't work, turn off 'needs shell' and use bash as the executable and the fully specified path/filename of your script as the user argument and see if that works. I would turn off the 'Event_ID' parameter from the Settings/Parameters page if doing it that way.
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 KenV99 - 2014-10-05, 14:37
Logout Mark Read Team Forum Stats Members Help
[RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...)4