adddirectoryitem sys.argv error - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: adddirectoryitem sys.argv error (/showthread.php?tid=172328) |
adddirectoryitem sys.argv error - karrade - 2013-08-29 Ok, I did research this and found out I was trying to execute the addon as a script and that was my problem.. so I did a test and it worked: I changed it to Code: <extension point="xbmc.python.pluginsource" library="default.py"> and it worked.. but then I needed it to run as a service and now it is giving me: Code: 08:42:07 T:5532 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- yet again. any ideas? EDIT::: I just was messing around with it and I found out that when I go to video addons and click my addon it works. but I need to be able to call Categories() on PlaybackEnded RE: adddirectoryitem sys.argv error - sphere - 2013-08-29 You can't add ListItems (or more generic: Do what a plugin does) from a service add-on. RE: adddirectoryitem sys.argv error - karrade - 2013-08-29 Ok so just to make sure. I cant have my addon automatically start and create a list of streaming videos in any way? Thank you for your response RE: adddirectoryitem sys.argv error - sphere - 2013-08-29 You can't just take a video plugin and let it be a service add-on. But you CAN create an service add-on which executes Code: xbmc.executebuiltin('Container.Update(YOUR_PLUGIN_URL)') Code: xbmc.executebuiltin('Container.Update(plugin://plugin.video.youtube/)') And if you got this working you can do it in a single add-on with multiple extension points and multiple python files. EDIT: This is untested! It may be required to switch the window before updating the container. RE: adddirectoryitem sys.argv error - karrade - 2013-08-31 ok, I created multiple extension points and everthing works.. Code: <extension point="xbmc.python.script" library="default.py"> the list of videos works as well but ONLY if I go to video addons and start it that way. any other way I try to start it I get this: Code: WARNING: Attempt to use invalid handle -1 any Idea on how to just open this part as if I were clicking on it under video addons? EDIT:::: ok my mistake I need to use: Code: xbmc.executebuiltin("XBMC.ActivateWindow(?,plugin://script.tv.promos/)") Just have to figure out what ID to use in place of the ? RE: adddirectoryitem sys.argv error - sphere - 2013-08-31 (2013-08-31, 03:31)karrade Wrote: What about "Videos" (10006)? Code: xbmc.executebuiltin("XBMC.ActivateWindow(Videos,plugin://script.tv.promos/)") RE: adddirectoryitem sys.argv error - karrade - 2013-08-31 It works but when I try to get out of it with backspace it takes me through other menus. I. Trying to figure out a way to have it play videos like 10006 but exit like 10028 RE: adddirectoryitem sys.argv error - sphere - 2013-08-31 Try it with "ReplaceWindow" instead "ActivateWindow". Untested. RE: adddirectoryitem sys.argv error - karrade - 2013-09-02 Still the same thing... what about monitoring for a backspace press? Or is that not a good idea in xbmc? |