2021-10-06, 19:29
I see some people have trouble with On Playback Started with Kodi 18, but it's working fine for me. On Playback Paused, is not working though. Does anyone know how I can get it working?
(2022-03-12, 19:24)ReplayHarry Wrote: I have been using callbacks for many years successfully until I went to 19.3. I miss it. Don't expect anything real soon, but I have been working on a fix for several weeks now and am close to having it working. I only use onPlayStarted, onPlayResumed, and onPlayStopped, so I am only trying to get those working. Also I am executing a Python script when one of these events is triggered. And to add one more thing, I use "import and run".
So keep checking here and I may have a fix real soon. I already think I have the callback code fixed. The problem (for me) seems to be in the "taskPython.py" script. So now making some fixes in my code.
Stay tuned.
(2021-03-04, 23:29)pikim Wrote: I forked the plugin on Github and began to port it to Python 3. When there's no configuration existing it starts without errors, but it does not work at the moment. Could you please install it, create a configuration and give me some feedback: what did you do and which error occurred in the kodi.log.
I'll try to fix the issues, but I've only limited time and no experience with Kodi plugin development, so please be patient.
You can download it under https://github.com/pikim/script.service.kodi.callbacks -> Code -> Download ZIP. Unzip the content into the Kodi addon directory and remove the trailing '-master' from the directory name.
(2022-04-14, 20:22)hieppo Wrote: Tried installing the addons on Kodi 19 which is now using Python 3.x only. The error I got trying to install callback, "The dependency on xbmc.python version 2.20.0 could not be satisfied".NVM, did some digging and found an updated github, for those have the same question, here is the updated github repo. https://github.com/pikim/script.service.kodi.callbacks
I am assuming the code for this addon needs to be updated to use the Python 3.x library. Any chance will this be updated?
I found the Callbacks add-on but nothing else AND I found that is no longer 100 % working at Kodi v19 due to its Python 2 source code. What a pity! It would be great if some of the many forks (I saw 23) would be successful.cpp:powercfg /change monitor-timeout-ac 120
(2022-04-15, 11:37)_Michael_ Wrote: Anyhow I will try now the fork of pikim and I will see how far I will come.Unfortunately not that far, i.e. the add-on was not allowing me to select any event in the 'Events' tab sheet. Kodi.log excerpt:
xml:2022-04-15 12:15:55.582 T:8148 DEBUG <general>: CPythonInvoker(3, C:\Program Files\Kodi\addons\script.service.kodi.callbacks\script.py): the source file to load is "C:\Program Files\Kodi\addons\script.service.kodi.callbacks\script.py"
2022-04-15 12:15:55.582 T:8148 DEBUG <general>: CPythonInvoker(3, C:\Program Files\Kodi\addons\script.service.kodi.callbacks\script.py): setting the Python path to C:\Program Files\Kodi\addons\script.service.kodi.callbacks;C:\Program Files\Kodi\system\python\Lib;C:\Program Files\Kodi\python3.8.zip;C:\Program Files\Kodi\system\python\DLLs;C:\Program Files\Kodi;C:\Program Files\Kodi\system\python;C:\Program Files\Kodi\system\python\lib\site-packages
2022-04-15 12:15:55.582 T:8148 DEBUG <general>: CPythonInvoker(3, C:\Program Files\Kodi\addons\script.service.kodi.callbacks\script.py): entering source directory C:\Program Files\Kodi\addons\script.service.kodi.callbacks
2022-04-15 12:15:55.582 T:8148 DEBUG <general>: CPythonInvoker(3, C:\Program Files\Kodi\addons\script.service.kodi.callbacks\script.py): instantiating addon using automatically obtained id of "script.service.kodi.callbacks" dependent on version 3.0.0 of the xbmc.python api
2022-04-15 12:15:55.610 T:6476 DEBUG <general>: Thread JobWorker 6476 terminating (autodelete)
2022-04-15 12:15:55.610 T:1264 DEBUG <general>: Thread JobWorker 1264 terminating (autodelete)
2022-04-15 12:15:55.610 T:384 DEBUG <general>: Thread JobWorker 384 terminating (autodelete)
2022-04-15 12:15:55.610 T:5088 DEBUG <general>: Thread JobWorker 5088 terminating (autodelete)
2022-04-15 12:15:55.615 T:5124 DEBUG <general>: Keyboard: scancode: 0x1d, sym: 0x306, unicode: 0x0000, modifier: 0x64
2022-04-15 12:15:55.615 T:5124 DEBUG <general>: CInputManager::HandleKey: ctrl-leftctrl (0x1f0d0) pressed, action is
2022-04-15 12:15:55.615 T:5124 DEBUG <general>: Keyboard: scancode: 0x38, sym: 0x308, unicode: 0x0000, modifier: 0x320
2022-04-15 12:15:55.615 T:5124 DEBUG <general>: CInputManager::HandleKey: ctrl-alt-leftalt (0x5f0d4) pressed, action is
2022-04-15 12:15:55.635 T:8148 DEBUG <general>: Could not locate po at C:\Users\HTPC\AppData\Roaming\Kodi\addons\script.service.kodi.callbacks\resources\language\English\strings.po
2022-04-15 12:15:55.638 T:8148 WARNING <general>: xbmc.translatePath is deprecated and might be removed in future kodi versions. Please use xbmcvfs.translatePath instead.
2022-04-15 12:15:55.666 T:8148 ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'ModuleNotFoundError'>
Error Contents: No module named 'requests'
Traceback (most recent call last):
File "C:\Program Files\Kodi\addons\script.service.kodi.callbacks\script.py", line 25, in <module>
import resources.lib.pubsub as PubSub_Threaded
File "C:\Program Files\Kodi\addons\script.service.kodi.callbacks\resources\lib\__init__.py", line 77, in <module>
module = __import__(modname, fromlist="dummy")
File "C:\Program Files\Kodi\addons\script.service.kodi.callbacks\resources\lib\tasks\taskHttp.py", line 20, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
-->End of Python script error report<--
2022-04-15 12:15:55.666 T:8148 DEBUG <general>: CPythonInvoker::onExecutionDone(3, C:\Program Files\Kodi\addons\script.service.kodi.callbacks\script.py)
2022-04-15 12:15:55.668 T:8148 INFO <general>: Python interpreter stopped
2022-04-15 12:15:55.669 T:8148 DEBUG <general>: Thread LanguageInvoker 8148 terminating
in a command window? Maybe you'll have to go topython:pip install requests
first. But I've no idea whether pip works on your setup.python:C:\Program Files\Kodi\system\python