[RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +---- Forum: Service Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=152) +---- Thread: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) (/showthread.php?tid=151011) |
RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - activate - 2014-01-31 Thanks. This is cool. I am using it on OS X. Wondering if anyone has been able to run an applescript. I can trigger an app but not a script file. Edit: Thanks for the info, used bash script. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - Kib - 2014-02-08 (2014-01-31, 09:14)activate Wrote: Thanks. This is cool. I am using it on OS X. Wondering if anyone has been able to run an applescript. I can trigger an app but not a script file. Something like /usr/bin/osascript <scriptname> should work RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - joltman - 2014-02-08 Is it possible for this add-on to detect which video add-on is being launched then perform an action? Specifically, when I have a certain video streaming add-on start, I'd like to call a script that activates a VPN. Then, when the video streaming add-on is stopped, I'd like to call a script to deactivate the VPN. And then if there's a different video streaming add-on started, it would call a different VPN script? Thanks! RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - lukeg01 - 2014-02-15 hello, verry nice script , but how to configure it? perhaps you could help me with a example, like execute /home/xbian/lightsoff.sh when a movie of tv show starts ps Im just beginning with python so excuse me for my ignorance in the language Luke RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - lukeg01 - 2014-02-16 sorry, i found out its really a plugin, i tough it was a script. how to change it so it doesn't see music as a player? luke RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - metheos - 2014-02-21 Great add on! It does what I needed just fine. My only nitpick is that the script I put into the xbmc start option gets abandoned after exiting and shows up on the process list as a zombie! Not a big deal, but it would be nice if that didn't happen. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - metheos - 2014-02-22 (2014-02-21, 02:02)metheos Wrote: Great add on! It does what I needed just fine. My only nitpick is that the script I put into the xbmc start option gets abandoned after exiting and shows up on the process list as a zombie! Not a big deal, but it would be nice if that didn't happen. I was able to get this to work by adding a wait to the process and pointing it to a script that forks the actual script. Code: class Main: RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - pilluli - 2014-02-22 (2014-02-22, 20:19)metheos Wrote:(2014-02-21, 02:02)metheos Wrote: Great add on! It does what I needed just fine. My only nitpick is that the script I put into the xbmc start option gets abandoned after exiting and shows up on the process list as a zombie! Not a big deal, but it would be nice if that didn't happen. Thanks for this, to be honest it does not happen in my setup (raspbmc) but I will investigate further. Regards, RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - pilluli - 2014-02-27 Hi, I have created a new version (v0.5) that I think fixes the possible zombie processes. Thanks for reporting this: https://github.com/pilluli/service.xbmc.callbacks/archive/v0.5.zip Regards, RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - jvc1986 - 2014-03-01 How can I run a file with additional attributes, I need to be able to either: 1 - Link to a shortcut or 2 - Be able to point to a program like this ""C:\Program Files (x86)\HomeSeer HS2\HsScript.exe" MovieStart.vb" Is that possible somehow, because in the XBMC interface I can't manually type the script location RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - Samu-rai - 2014-03-02 (2014-03-01, 09:40)jvc1986 Wrote: How can I run a file with additional attributes, I need to be able to either: Yes, go to addon_data > service.xbmc.callbacks > and manually edit the settings.xml I'm trying to run a script after library update, but I'm getting the following errors: Code: 13:45:42 T:10988 DEBUG: XBMC callbacks: database updated The script will run if manually executed through XBMC so I know that it works. Any ideas? RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - Samu-rai - 2014-03-07 Sorry to bump this. It would be tremendous if I could get this working. The solution I've been looking for for months. I would be eternally grateful for any advice that could be offered. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - flarc - 2014-03-09 Hi all, I am using this superb addon on windows. I use it to pilot my philips hue: 20% light when player starts/resumes, and 100% light when player stops/pauses. To do so, i create .bat file containing the curl command. It works. However, when invoking the .bat, there is a console window opening briefly. I would like the invocation to be invisible. I tried "start /min light.bat", i tried also "wscript light.vbs" (with adequate code that does not show a window). Both those fail to be started. And i have no error log. I do no why they are not started: maybe due to presence of an argument? Any idea to mask that console window? I currently returned back to .bat file, but it is not sexy... RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - KenV99 - 2014-03-09 (2014-03-09, 15:43)flarc Wrote: Hi all, Can you post the code that you used in the .bat file as well as the code in the .vbs file? Have you tried inserting a bit of code in either of those files to see if they are being executed? Like create a message box? Once done debugging then you would delete that code. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - flarc - 2014-03-10 Hello, thanks for your helps. 1) Ok, so currently, my settings.xml is like this: Code: <setting id="player_pauses" value="C:\sarah\plugins\fred\bin\huelight_high.bat" /> And the "huelight_high.bat" is like that: Code: @echo off This works, but i see a brief console window appear. 2) I tried also this (xml manually edited because .vbs is not displayed in xbmc add-on configuration screen): settings.xml: Code: <setting id="player_pauses" value="C:\sarah\plugins\fred\bin\huelight_high.vbs" /> huelight_high.vbs: Code: Set WshShell = WScript.CreateObject("WScript.Shell") The huelight_high.bat is unchanged. If i run manually the vbs, it works without console appearing. But within XBMC, the command is not performed (which i can see only due to no change of light) Does not work either with: settings.xml: Code: <setting id="player_pauses" value="wscript C:\sarah\plugins\fred\bin\huelight_high.vbs" /> 3) I also tried compiling the .bat into .exe, and updating accordingly the settings.xml, but does not work either. Code: <setting id="player_pauses" value="C:\sarah\plugins\fred\bin\huelight_high.exe" /> 4) I did not try yet to put directly the long curl command into the settings.xml (i need to see how to manage the quotes within the command). 5) Last thing i would try (but i do not know yet how to do it) is calling directly a python script (that would be interpreted by xbmc's own python lib) to change hue lights. If you have an idea to make option#1 or #2 work, it would be helpful, because i would prefer those ways of doing it. But if option#5 would work, i will take it. |