From 775e1c5ccc401a8750a9b26a0e580e20d045c2c7 Mon Sep 17 00:00:00 2001 From: patrickkfkan Date: Sat, 11 Mar 2023 05:54:07 +0800 Subject: [PATCH] feat(parser): add `view_playlist` to `Playlist` --- src/parser/classes/Playlist.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/parser/classes/Playlist.ts b/src/parser/classes/Playlist.ts index 94ea49318..2c603d1e1 100644 --- a/src/parser/classes/Playlist.ts +++ b/src/parser/classes/Playlist.ts @@ -4,6 +4,7 @@ import Thumbnail from './misc/Thumbnail.js'; import NavigationEndpoint from './NavigationEndpoint.js'; import PlaylistAuthor from './misc/PlaylistAuthor.js'; import { YTNode } from '../helpers.js'; +import NavigatableText from './misc/NavigatableText.js'; class Playlist extends YTNode { static type = 'Playlist'; @@ -20,6 +21,7 @@ class Playlist extends YTNode { badges; endpoint: NavigationEndpoint; thumbnail_overlays; + view_playlist?: NavigatableText; constructor(data: any) { super(); @@ -39,6 +41,10 @@ class Playlist extends YTNode { this.badges = Parser.parseArray(data.ownerBadges); this.endpoint = new NavigationEndpoint(data.navigationEndpoint); this.thumbnail_overlays = Parser.parseArray(data.thumbnailOverlays); + + if (data.viewPlaylistText) { + this.view_playlist = new NavigatableText(data.viewPlaylistText); + } } }