• 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 23
[RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...)
Ok, thanks.
Actually I do need filename and title, but I will install this and see what happens, then I can always go back.
Won't be able to try till tomorrow mornings "Good Day".
Question: Would this affect getting filename and title in this particular circumstance (not getting filename or title) or all? If it just affects this one, then I could probably live with it.
I sure appreciate your assistance. I'll get back to you tomorrow.
Reply
It's only happening when you are getting the error. Even though Kodi is triggering the script that playback has started, it is not able to retrieve either the filename or title at that point. This is the first that I am hearing of this issue and should only affect this circumstance with comskip as far as I can tell.
Reply
(2015-05-26, 20:01)KenV99 Wrote: It's only happening when you are getting the error. Even though Kodi is triggering the script that playback has started, it is not able to retrieve either the filename or title at that point. This is the first that I am hearing of this issue and should only affect this circumstance with comskip as far as I can tell.

Success! It worked perfect this morning.

Thanks again for your help above and beyond. This addon has been a big help to me and appreciate your designing and coding it. You're an artist.
Reply
(2015-05-27, 15:38)ReplayHarry Wrote:
(2015-05-26, 20:01)KenV99 Wrote: It's only happening when you are getting the error. Even though Kodi is triggering the script that playback has started, it is not able to retrieve either the filename or title at that point. This is the first that I am hearing of this issue and should only affect this circumstance with comskip as far as I can tell.

Success! It worked perfect this morning.

Thanks again for your help above and beyond. This addon has been a big help to me and appreciate your designing and coding it. You're an artist.

No problem, glad it's working now.
Reply
Love this service -

Is there a way to set an action to run only when a Smart Playlist plays?

I have an action working on the regular Playback event, but would love to restrict this to only Smart Playlists.

Thanks!
Reply
(2015-06-06, 07:48)GriffeyJuni0r Wrote: Love this service -

Is there a way to set an action to run only when a Smart Playlist plays?

I have an action working on the regular Playback event, but would love to restrict this to only Smart Playlists.

Thanks!

In short, no not directly. Looking through the Kodi Pydocs, there is no easy way to discover from the playing item if it is playing from a smart playlist.
There might be a way using JSON but I'll leave that for your own exploration.
Reply
I just tried this on Raspberry Pi 2 running OSMC and the script never runs. I have executable permissions. Is there some dependency? I have great success on 64 bit ubuntu , but not on Pi 2 with OSMC
Reply
(2015-06-22, 21:52)tekno Wrote: I just tried this on Raspberry Pi 2 running OSMC and the script never runs. I have executable permissions. Is there some dependency? I have great success on 64 bit ubuntu , but not on Pi 2 with OSMC

If you installed my version from GitHub there aren't any dependencies.

As always, a log uploaded to pastebin or similar and linked here is really the only way to provide any assistance.
Reply
Thanks KenV99,

I have been using this older version for some time and was unaware of a newer fork.

this newer version works great. Good work.

Mark
Reply
Ken: My little script has been working just fine for awhile now, but today on my desktop (my test machine before I put changes on my HTPC) I started to get script errors on the callback2 addon. See below.
21:53:12 T:1892 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ImportError'>
Error Contents: No module named requests2
Traceback (most recent call last):
File "C:\Users\Harry\AppData\Roaming\Kodi\addons\service.xbmc.callbacks2-master\default.py", line 46, in <module>
import requests2 as requests
ImportError: No module named requests2
-->End of Python script error report<--
I had been modifying my script for some "cosmetic" issues and testing the changes. Out of nowhere this comes up. I made no modifications to your script, but since I installed Helix since I put your last fix in, I was thinking maybe that was it.
Any ideas? What kind of additional info might you need.

Thanks for any help you may give. If worst comes to worst I will just re-install the addon and start from scratch I guess.
Reply
Is it missing an import request2?
Reply
I looked at the code and it has IMPORT REQUESTS2 as REQUESTS
But the question is what happen to the REQUEST2 module and how do I get it back? As it appears it isn't finding it all of a sudden.

----UPDATE
Since I was awake anyway, I decided to put my new code (my script that works with callback2) on my HTPC. Of course I renamed my old code to oldxxxx.py so I could go back to it. It worked fine over there and no "script error" for callback2 when I started up Kodi.
So all I can figure out is that someway the REQUEST2 module got zapped when I was testing my code on my desktop.
So if I can get it back, all should be normal again.
Do I just pip it back? I know how to do that on Python in general, but how do I get it back into Kodi's python.

--update 6/26/2015
uninstalled callback2 addon and re-installed and all is working fine again.
Reply
Hi, this looks really interesting! I wonder if this can work with my set up. I run kodi on windows 8.1 and have a script that activates batch files to switch between VPNs when opening various addons. I have not been able to make the VPN disconnect when exiting an addon using this script. Could this allow me to disconnect my VPN via .bat file when exiting an addon/returning to main kodi screen? An alternative would be to disconnect the VPN when stopping playback of a stream from within an addon? Cheers for any info
Reply
(2015-07-14, 00:34)Alth79 Wrote: Hi, this looks really interesting! I wonder if this can work with my set up. I run kodi on windows 8.1 and have a script that activates batch files to switch between VPNs when opening various addons. I have not been able to make the VPN disconnect when exiting an addon using this script. Could this allow me to disconnect my VPN via .bat file when exiting an addon/returning to main kodi screen? An alternative would be to disconnect the VPN when stopping playback of a stream from within an addon? Cheers for any info

In a nutshell, no. It works only for the events here:
https://github.com/KenV99/service.xbmc.callbacks2/wiki

You could edit the addon scripts that you want use the vpn in by inserting a subprocess call at the start and exit that calls your respective batch files.

https://docs.python.org/2/library/subpro...eck_output
Reply
Hi kenv99, thanks for the quick reply. Sadly for me that is all way too complicated ha ha! Would love to learn how to develop this type of thing but wouldn't know where to start! Cheers again
Reply
  • 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 23

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...)4