mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-13 01:22:11 +00:00
Fix getPlaylist playlist ID (#898)
This commit is contained in:
@@ -237,12 +237,11 @@ export default class PlaylistManager {
|
||||
}
|
||||
|
||||
async #getPlaylist(playlist_id: string): Promise<Playlist> {
|
||||
let id = playlist_id;
|
||||
if (!playlist_id.startsWith('VL')) {
|
||||
playlist_id = `VL${playlist_id}`;
|
||||
}
|
||||
|
||||
if (!id.startsWith('VL'))
|
||||
id = `VL${id}`;
|
||||
|
||||
const browse_endpoint = new NavigationEndpoint({ browseEndpoint: { browseId: `VL${id}` } });
|
||||
const browse_endpoint = new NavigationEndpoint({ browseEndpoint: { browseId: playlist_id } });
|
||||
const browse_response = await browse_endpoint.call(this.#actions, { parse: true });
|
||||
|
||||
return new Playlist(this.#actions, browse_response, true);
|
||||
|
||||
Reference in New Issue
Block a user