tamland / kodi-plugin-routing

A routing module for kodi plugins
GNU General Public License v3.0
40 stars 12 forks source link

Broken in v18 with reusepython #5

Closed zach-morris closed 5 years ago

zach-morris commented 6 years ago

My addon uses script.module.routing and I've found it's stopped working with the Kodi v18 alpha 2 nightlies.

I've narrowed it down to this change in Kodi: https://github.com/xbmc/xbmc/pull/13814

The current issue is the routes are not followed with this change included in Kodi when using script.module.routing. I can't quite figure out what the specific issue is, but I'm guessing it's the way sys.argv is called within the script.

Rechi commented 6 years ago

As mention in the kodi PR

In order to work as expected, you have to refresh them (passing from default.py to submodules).

Here are the required changes

--- a/addon.py
+++ b/addon.py
@@ -5,6 +5,7 @@ from kodi_six import xbmc, xbmcaddon, xbmcplugin, xbmcgui, xbmcvfs
 xbmc.log(msg='IAGL:  Lets Play!', level=xbmc.LOGNOTICE)
 xbmc.log(msg='IAGL:  Version %(addon_version)s' % {'addon_version': xbmcaddon.Addon().getAddonInfo('version')}, level=xbmc.LOGDEBUG)
 import routing
+import sys
 from resources.lib.main import *

 try:
@@ -373,4 +374,4 @@ def iagl_text_viewer():
        IAGL_Dialog.doModal()

 if __name__ == '__main__':
-       plugin.run()
+       plugin.run(sys.argv)
zach-morris commented 6 years ago

Hmm, this doesnt seem to fully solve the issue. The routes now work, but after selecting a listitem, then returning to the list to browse again, any subsequent selection does not work. I can confirm that subsequent selections work normally if I add

<reuselanguageinvoker>false</reuselanguageinvoker>

to the addon.xml, so something still isn't working within the routing addon. Nothing in the logs points to any issue - I'll keep digging into it to try and identify where the issue is.

dagwieers commented 5 years ago

Can you provide me with a minimal reproducer? Because I cannot reproduce this issue.

zach-morris commented 5 years ago

Kodi has since removed reuselanguageinvoker default change, so I think this issue is fixed on the Kodi side by default