diff --git a/CHANGELOG.md b/CHANGELOG.md index d5d092e7..0054fd8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +- Nothing worth mentioning yet. + ## [0.35.0] - 2024-12-24 ### Added diff --git a/playlet-lib/src/components/Services/Invidious/InvidiousService.bs b/playlet-lib/src/components/Services/Invidious/InvidiousService.bs index c2be1928..9cd9da66 100644 --- a/playlet-lib/src/components/Services/Invidious/InvidiousService.bs +++ b/playlet-lib/src/components/Services/Invidious/InvidiousService.bs @@ -164,14 +164,16 @@ namespace Invidious function GetPlaylist(playlistId as string, index = 0 as integer, cancellation = invalid as object) as object authToken = m.invidiousNode.authToken - if authToken = invalid - instance = m.GetInstance() - url = `${instance}${Invidious.PLAYLISTS_ENDPOINT}/${playlistId}` - request = HttpClient.Get(url) - else + ' There's no need to use auth, unless the playlist is from Invidious + ' (starts with "IV") because it can be a private playlist from logged user. + if playlistId.StartsWith("IV") and authToken <> invalid url = `${authToken.instance}${Invidious.AUTH_PLAYLISTS}/${playlistId}` request = HttpClient.Get(url) request.Headers(m.GetAuthenticationHeaders(authToken.token)) + else + instance = m.GetInstance() + url = `${instance}${Invidious.PLAYLISTS_ENDPOINT}/${playlistId}` + request = HttpClient.Get(url) end if request.QueryParam("index", index)