diff --git a/resources/lib/youtube_plugin/kodion/plugin/xbmc/xbmc_plugin.py b/resources/lib/youtube_plugin/kodion/plugin/xbmc/xbmc_plugin.py index 5d0007196..5c2eac74f 100644 --- a/resources/lib/youtube_plugin/kodion/plugin/xbmc/xbmc_plugin.py +++ b/resources/lib/youtube_plugin/kodion/plugin/xbmc/xbmc_plugin.py @@ -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'), @@ -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: diff --git a/resources/lib/youtube_plugin/youtube/helper/yt_play.py b/resources/lib/youtube_plugin/youtube/helper/yt_play.py index 7282ecda9..351250920 100644 --- a/resources/lib/youtube_plugin/youtube/helper/yt_play.py +++ b/resources/lib/youtube_plugin/youtube/helper/yt_play.py @@ -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]