Skip to content

Commit

Permalink
Further improvements to fallback window handling
Browse files Browse the repository at this point in the history
  • Loading branch information
MoojMidge committed Dec 19, 2024
1 parent 52a4985 commit 8750139
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
27 changes: 18 additions & 9 deletions resources/lib/youtube_plugin/kodion/plugin/xbmc/xbmc_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def run(self, provider, context, focused=None):
result = [
CommandItem(
name=context.localize('page.back'),
command='Action(ParentDir)',
command='Action(Back)',
context=context,
image='DefaultFolderBack.png',
plot=context.localize('page.empty'),
Expand Down Expand Up @@ -257,14 +257,23 @@ def run(self, provider, context, focused=None):
ui.clear_property(CONTENT_TYPE)

if not options or options.get(provider.RESULT_FALLBACK, True):
_, _post_run_action = self.uri_action(
context,
context.get_parent_uri(params={
'window_fallback': True,
'window_replace': True,
'window_return': False,
}),
)
if (context.is_plugin_folder()
and context.is_plugin_path(
context.get_infolabel('Container.FolderPath')
)):
_, _post_run_action = self.uri_action(
context,
context.get_parent_uri(params={
'window_fallback': True,
'window_replace': True,
'window_return': False,
}),
)
else:
_, _post_run_action = self.uri_action(
context,
'command://Action(Back)',
)
if post_run_action and _post_run_action:
post_run_action = (post_run_action, _post_run_action)
else:
Expand Down
1 change: 0 additions & 1 deletion resources/lib/youtube_plugin/youtube/helper/yt_play.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,5 +469,4 @@ def process_items_for_playlist(context,
context.sleep(1)
else:
playlist_player.play_playlist_item(position)
return
return items[position - 1]

0 comments on commit 8750139

Please sign in to comment.