[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...) - armaster - 2015-07-24 This add-on works great on my Pi1 but after installing on Pi2 (OSMC) it doesn't run bash scripts. Any suggestions please? Thanks. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - KenV99 - 2015-07-24 This, almost always, is a permissions issue. But as has been mentioned OVER AND OVER on the forums, if you don't post your kodi.log to pastebin and put a link, it's pretty much impossible to provide useful help. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - raspdealer - 2015-07-25 Hi, I'm looking for something like ! I will try your script asap. Is it possible to call a bash with arguments on start and finished library update? Is it possible to extract library results (like new added shows or movies episodes?) That's was my initial post : http://forum.kodi.tv/showthread.php?tid=233156 RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - raspdealer - 2015-07-25 The database update event is launch at start or finish ? RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - KenV99 - 2015-07-25 (2015-07-25, 14:31)raspdealer Wrote: The database update event is launch at start or finish ? Read here: http://mirrors.kodi.tv/docs/python-docs/15.x-isengard/xbmc.html#Monitor Edit: I realized after posting that the new(ish) start and finish events for the database are not fully implemented in the current release. I will post back once I have updated it. Sorry. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - MKANET - 2015-07-25 KenV99, thanks again for the great addon. Im attempting to manually start the TrakTV addon Rating dialog after media playback has stopped. I know where the python script is that should be executed: C:\Users\MKANET\AppData\Roaming\Kodi\addons\script.trakt-master\rating.py ..however, I'm sure what to put in the XMBC.Callbacks2 parameters field. I would appreciate any help or tips you could offer. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - KenV99 - 2015-07-25 (2015-07-25, 19:53)MKANET Wrote: KenV99, thanks again for the great addon. Im attempting to manually start the TrakTV addon Rating dialog after media playback has stopped. I know where the python script is that should be executed: Choose OnPlaybackStopped, choose 'python' and then type/paste the full path to the script as you have listed above. If you do not need to pass any information to the script when it's called, you don't need any parameters. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - MKANET - 2015-07-26 Actually, that's what I already had. But, nothing was happening when the script was being executed. Kodi log just shows it successfully getting executed. I presumed the script is looking for a parameter for it to work. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - KenV99 - 2015-07-26 I don't have the trakt.tv addon installed but looking at the code on github, I noted the following: 1) rating.py is a module that is imported by other modules and does not have any code that executes 2) the addon runs as a service and there is substantial infrastructure that needs to be loaded before being able to provide a rating 3) there is no simple way for an external script to call code in another script (this is true of all addons) 4) the addon already implements events for Player.OnPlaybackStopped So, in short, you cannot do what you are trying to do using XBMC.Callbacks2. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - KenV99 - 2015-07-26 (2015-07-25, 14:31)raspdealer Wrote: The database update event is launch at start or finish ? I updated the addon on Github. Please download the latest version: https://github.com/KenV99/service.xbmc.callbacks2 I haven't extensively tested yet, so please let me know if there are any issues. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - bks84 - 2015-07-26 Hi, I tried to install the add-on on my RPI 2 (Kodi 14.2) by using the zip file but it is missing dependencies. I also tried to install it by uploading the contents of the zip into the \Userdata\addon_data\ directory but the add-on is not listed anywhere. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - KenV99 - 2015-07-26 (2015-07-26, 17:32)bks84 Wrote: Hi, I tried to install the add-on on my RPI 2 (Kodi 14.2) by using the zip file but it is missing dependencies. I also tried to install it by uploading the contents of the zip into the \Userdata\addon_data\ directory but the add-on is not listed anywhere. 1) The addon requires the requests2 (script.module.requests2) library as a dependency. If you properly install from zip, Kodi should download and install the dependency. 2) That is the wrong directory. Depending on what OS you have on the RPI it should be something like '/storage/.kodi/addons/'. But if you direct install you may run into the same issue with the dependency. If Kodi isn't finding requests2, it can be downloaded directly from: https://github.com/beenje/script.module.requests2 RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - MKANET - 2015-07-26 Hi KenV99, Thanks for looking into this. It looks like I wasn't even close at achieving what I wanted. There's an incompatibility issue between the track.tv addon and the DSPlayer version of Kodi which prevents this module from opening TrakTV ratings dialog box reliability. I was just looking for a way to avoid that issue. (2015-07-26, 00:30)KenV99 Wrote: I don't have the trakt.tv addon installed but looking at the code on github, I noted the following: RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - MPRESTON81 - 2015-07-27 Hi everyone, new comer from the MCE world, and have been very impressed with kodi and how I can integrate it with my home automation. Couple of quick questions though. I know nothing of python but have cobbled together a few scripts that seem to be working for my lighting needs that can differentiate between night and day. BUT FOR THE LIFE OF ME I CANNOT GET RESUME TO WORK!!!! I was up until 4am the other night trying to make it do what I wanted. Does kodi pass a media type argument on resume? After the amount of time I have spent on this I'm thinking its a no. Basically when I watch a movie at night and I pause the lights behind my couch turn on. When I resume my hope would be that for a movie the light would turn back off, whereas for just regular tv watching I want all my lights to stay on. Which it currently doesn't do no matter what arguments I set. Code: import xbmc Thanks in advance for any help or pointers offered. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - armaster - 2015-07-27 (2015-07-24, 14:11)KenV99 Wrote: This, almost always, is a permissions issue. Here is my log: http://xbmclogs.com/pvfhmd9zj . If I run script from shell it works. Thanks fro your reply. |