From 2351a4a50b1c78e5504d4dcd32db0aa002cda309 Mon Sep 17 00:00:00 2001 From: MoojMidge <56883549+MoojMidge@users.noreply.github.com> Date: Fri, 25 Oct 2024 21:18:40 +1100 Subject: [PATCH] Dont ask for playlist order when playing from specific video --- resources/lib/youtube_plugin/youtube/helper/yt_play.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/lib/youtube_plugin/youtube/helper/yt_play.py b/resources/lib/youtube_plugin/youtube/helper/yt_play.py index 705cb4536..fd39bddbd 100644 --- a/resources/lib/youtube_plugin/youtube/helper/yt_play.py +++ b/resources/lib/youtube_plugin/youtube/helper/yt_play.py @@ -180,6 +180,7 @@ def _play_playlist(provider, context): playlist_ids = params.get('playlist_ids') if not playlist_ids: playlist_ids = [params.get('playlist_id')] + video_id = params.get('video_id') resource_manager = provider.get_resource_manager(context) ui = context.get_ui() @@ -223,8 +224,10 @@ def _play_playlist(provider, context): return False # select order - order = params.get('order', '') - if not order: + order = params.get('order') + if not order and not video_id: + order = 'ask' + if order == 'ask': order_list = ('default', 'reverse', 'shuffle') items = [(context.localize('playlist.play.%s' % order), order) for order in order_list] @@ -250,7 +253,6 @@ def _play_playlist(provider, context): playlist_player.unshuffle() # check if we have a video as starting point for the playlist - video_id = params.get('video_id') playlist_position = None if video_id else 0 # add videos to playlist for idx, video in enumerate(videos):