[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...) - crax - 2013-12-16 This sounds like the add-on I am looking for. I'm running XBMC on a Raspberry PI (in Raspbmc). I'm also using the same PI as Squeezelite player. Unfortunately, with both programs running, I can not play DTS movies over HDMI, as the Squeezelite seems to be blocking the audio somehow. If I stop the Squeezelite service there is no problem. So now I'm hoping that your add-on can help me to stop Squeezelite when video starts and then start the Squeezelite again after the video stops? RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - sIRwa2 - 2013-12-16 Quote:14:48:45 T:2903493440 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--Im getting this in some XBMC Crashlogs. is this something to ignore? RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - Junkyard - 2013-12-18 Thanks for this add-on, it's just what I was looking for. I've been trying to find an add-on which will log played media to a text file, but having established that nothing like that exists I decided I'd have to write one. Since I'm unfamiliar with XBMC development the task seemed a bit daunting, but I should be able to adapt your script to do what I need in no time. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - pilluli - 2013-12-19 (2013-12-16, 12:59)crax Wrote: This sounds like the add-on I am looking for. Sure you can do it. I use it myself for something really similar in the same raspberry! Here is the script that I have to start hyperion when a video is played. Code: #!/usr/bin/env python You should change the code inside os.system to suit your needs, save this command in any folder and configure the addon to execute the command when playback starts (and do something similar for when the playback is stopped). Hope it helps. (2013-12-16, 16:04)sIRwa2 Wrote:Quote:14:48:45 T:2903493440 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--Im getting this in some XBMC Crashlogs. is this something to ignore? Does your script work? I mean, it gets executed and do what you intented? My initial guess is that maybe the scripts fails for some reason and that crashes the addon Could you please let me know the OS you run xbmc and if you can execute the script outside XBMC with no problems? Regards! RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - sIRwa2 - 2013-12-22 Quote:Could you please let me know the OS you run xbmc and if you can execute the script outside XBMC with no problems? Im running XBMCBuntu, the scripts run fine in terminal, but i have not seen the error in the newer log's, so i guess its a "one off" i do have some issues with xbmc but i think its related to mysql video-database sharing rather then to callback RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - birno - 2013-12-30 Hi, Is it possible to run script after library update/clean? RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - pilluli - 2013-12-31 (2013-12-30, 21:56)birno Wrote: Hi, I have added an option for that. Use v0.4 of the script (please it is not tested at all so let me know if it does not work!!) https://github.com/pilluli/service.xbmc.callbacks/archive/v0.4.zip Regards, RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - birno - 2013-12-31 (2013-12-31, 13:06)pilluli Wrote: I have added an option for that. Use v0.4 of the script (please it is not tested at all so let me know if it does not work!!) Works perfectly, thank you! RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - roveer - 2014-01-01 I've got a RPi and I'm wondering if a script could be written to do the following: When I play a movie on RPi, CEC automatically switches my TV's HDMI to the Pi which is great. What I'd like to do is that when the movie ends instead of going back to the XBMC menu have the script send a command to switch the HDMI back to the Cable Box input (say HDMI 1). I'm using XBMC Touch on iPads so I'm trying to insulate the xbmc menu's since everything is presented in a very pleasing way on the iPad. Having auto HDMI switching also removes the need to grab a remote and cycle through all the inputs once your done watching a movie to get back to regular TV. Would it be possible to do this using a script and your add-on? Thanks a bunch. Roveer. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - bronco70 - 2014-01-03 Hi, great add-on. I have a feature request I'd like to use this to send the aspect ratio of the video playing to an external application, which will then adjust my screen masking and projector settings accordingly. Would it be possible to send this (or other information on the current video) as a custom parameter? RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - birno - 2014-01-03 (2014-01-03, 08:48)bronco70 Wrote: Hi, great add-on. I have a feature request Maybe you can do this with the RPC API, just check the available functions and their return values. So you can call a parameterless script, which ask the needed information through RPC then call the other script with parameters. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - foomanshoe - 2014-01-16 This is perfect! I just picked up the Phillips Hue lights, and this will work great for dimming the lights on movie play/resume and bringing them back up on resume/stop. Looking forward to trying it out tonight. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - KenV99 - 2014-01-19 (2014-01-03, 08:48)bronco70 Wrote: Hi, great add-on. I have a feature request As best as I can tell, the XBMC python classes do not directly expose the aspect ratio for the file being played, however, using the filename, you can retrieve this information using a wrapper to the freely available and widely used mediainfo.dll, at least in windows. I am aware that versions exist for other OS's and the source is available for compilation on other platforms, but I have no experience there. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - roveer - 2014-01-25 Can this add-on possible execute the following command on video stop? Oh, I'm using a Raspberry Pi on Openelec. echo "tx 4F 82 10 00" | cec-client -s What this does is tells CEC to change HDMI to port 1. Not being a full blown programmer I'm kind of feeling my way in the dark. If someone can help me out a bit here I think I can get XBMC to do what I want. Thanks. Roveer RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - flarc - 2014-01-28 hello, thx for this addon, exactly what i needed question: how can i put as an argument to the called script the name of the movie that is being read/stopped? |