I'm not sure if that's easier. What could you get working? Maybe you did other things so I can see your idea.
I edited xbmc_context.py:
Code: Select all
if override:
self._uri = sys.argv[0].replace("video/", "video*")
#xbmc.log("sysarg0: " + str(sys.argv[0]))
#xbmc.log("sysarg1: " + str(sys.argv[1]))
#xbmc.log("sysarg2: " + str(sys.argv[2]))
comps = urlparse.urlparse(self._uri)
temp_netloc = comps.netloc
temp_netloc = temp_netloc.replace("video*", "video/")
comps = comps._replace(netloc=temp_netloc)
self._path = urllib.unquote(comps.path).decode('utf-8')
abstract_context.py:
Code: Select all
def create_uri(self, path=u'/', params=None):
if not params:
params = {}
pass
uri = create_uri_path(path)
#if uri:
# uri = "%s://%s%s" % ('plugin', self._plugin_id.encode('utf-8'), uri)
#else:
# uri = "%s://%s/" % ('plugin', self._plugin_id.encode('utf-8'))
# pass
if uri:
uri = "%s://%s%s%s" % ('plugin', 'video/', self._plugin_id.encode('utf-8'), uri)
else:
uri = "%s://%s%s/" % ('plugin', 'video/', self._plugin_id.encode('utf-8'))
pass
Maybe one more cannot see atm. I also wrote a nice "Youtube Updater" it downloads the latest version from github patches it and installs/updates the addon.
Obviously the patching routing is missing for now.
In my opinion it could work like said adding all folder structures and copies of default.py each copy maybe with slightly different import paths.