Skip to content

Commit

Permalink
Utils: Don't provide ytdl:// protocol links to external players (Fr…
Browse files Browse the repository at this point in the history
…eeTubeApp#3720)

Providing these type of links is currently unnecessary
and can turn into a hassle when the players are extended by scripts
that are not expecting them and don't function as intended.
  • Loading branch information
Svallinn authored Jul 3, 2023
1 parent a40075e commit 6495255
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/renderer/store/modules/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,21 +565,14 @@ const actions = {
showExternalPlayerUnsupportedActionToast(externalPlayer, 'looping playlists')
}
}
if (cmdArgs.supportsYtdlProtocol) {
args.push(`${cmdArgs.playlistUrl}ytdl://${payload.playlistId}`)
} else {
args.push(`${cmdArgs.playlistUrl}https://youtube.com/playlist?list=${payload.playlistId}`)
}

args.push(`${cmdArgs.playlistUrl}https://youtube.com/playlist?list=${payload.playlistId}`)
} else {
if (payload.playlistId != null && payload.playlistId !== '' && !ignoreWarnings) {
showExternalPlayerUnsupportedActionToast(externalPlayer, 'opening playlists')
}
if (payload.videoId != null) {
if (cmdArgs.supportsYtdlProtocol) {
args.push(`${cmdArgs.videoUrl}ytdl://${payload.videoId}`)
} else {
args.push(`${cmdArgs.videoUrl}https://www.youtube.com/watch?v=${payload.videoId}`)
}
args.push(`${cmdArgs.videoUrl}https://www.youtube.com/watch?v=${payload.videoId}`)
}
}

Expand Down

0 comments on commit 6495255

Please sign in to comment.