Skip to content

Commit

Permalink
Fix playlists for external players with no index support (#3797)
Browse files Browse the repository at this point in the history
* Fix playlists for players with no index support

* Fix typo
  • Loading branch information
trostboot authored Jul 28, 2023
1 parent b2cbef7 commit 47f69fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/renderer/store/modules/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.playlistIndex !== '') {
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')
Expand Down

0 comments on commit 47f69fc

Please sign in to comment.