Skip to content

Commit

Permalink
Use redirect in multiple busy dialog crash workaround anxdpanic#938
Browse files Browse the repository at this point in the history
  • Loading branch information
MoojMidge committed Nov 7, 2024
1 parent 3c7b7a3 commit 8d3f367
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ def create_uri(self, path=None, params=None, run=False):
uri = self._plugin_id.join(('plugin://', uri))

if params:
uri = '?'.join((uri, urlencode(params)))
if isinstance(params, (dict, list, tuple)):
params = urlencode(params)
uri = '?'.join((uri, params))

return ''.join((
'RunPlugin(',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from traceback import format_stack

from ..abstract_plugin import AbstractPlugin
from ...compatibility import xbmcplugin
from ...compatibility import urlsplit, xbmcplugin
from ...constants import (
BUSY_FLAG,
CONTAINER_FOCUS,
Expand Down Expand Up @@ -312,7 +312,12 @@ def uri_action(context, uri):

elif context.is_plugin_path(uri):
context.log_debug('Redirecting to: |{0}|'.format(uri))
action = 'RunPlugin({0})'.format(uri)
uri = urlsplit(uri)
action = context.create_uri(
(PATHS.ROUTE, uri.path),
uri.query,
run=True,
)
result = False

else:
Expand Down

0 comments on commit 8d3f367

Please sign in to comment.