From 4c619eddba492d171a020435a5fe66f12bfcb97a Mon Sep 17 00:00:00 2001 From: trostboot Date: Fri, 21 Jul 2023 14:04:16 +0200 Subject: [PATCH 1/2] Fix playlists for players with no index support --- src/renderer/store/modules/utils.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/renderer/store/modules/utils.js b/src/renderer/store/modules/utils.js index 8edf388fbd29..e4b7f05cc18e 100644 --- a/src/renderer/store/modules/utils.js +++ b/src/renderer/store/modules/utils.js @@ -585,7 +585,12 @@ const actions = { } } - args.push(`${cmdArgs.playlistUrl}https://youtube.com/playlist?list=${payload.playlistId}`) + // If the player supports opening playlists but not indexes, send only the video URL if an index is specified + if (cmdArgs.playlistIndex == null && payload.playlistIndex != null && payload.playlistId !== '') { + args.push(`${cmdArgs.videoUrl}https://youtube.com/watch?v=${payload.videoId}`) + } else { + args.push(`${cmdArgs.playlistUrl}https://youtube.com/playlist?list=${payload.playlistId}`) + } } else { if (payload.playlistId != null && payload.playlistId !== '' && !ignoreWarnings) { showExternalPlayerUnsupportedActionToast(externalPlayer, 'opening playlists') From 46574f85c2ae794f47c212a6926ff7c95e5feff7 Mon Sep 17 00:00:00 2001 From: trostboot Date: Fri, 21 Jul 2023 15:00:00 +0200 Subject: [PATCH 2/2] Fix typo --- src/renderer/store/modules/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/store/modules/utils.js b/src/renderer/store/modules/utils.js index e4b7f05cc18e..9027c138dd98 100644 --- a/src/renderer/store/modules/utils.js +++ b/src/renderer/store/modules/utils.js @@ -586,7 +586,7 @@ const actions = { } // If the player supports opening playlists but not indexes, send only the video URL if an index is specified - if (cmdArgs.playlistIndex == null && payload.playlistIndex != null && payload.playlistId !== '') { + if (cmdArgs.playlistIndex == null && payload.playlistIndex != null && payload.playlistIndex !== '') { args.push(`${cmdArgs.videoUrl}https://youtube.com/watch?v=${payload.videoId}`) } else { args.push(`${cmdArgs.playlistUrl}https://youtube.com/playlist?list=${payload.playlistId}`)