Skip to content

Commit

Permalink
feat(parser): add view_playlist to Playlist (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkfkan authored Mar 12, 2023
1 parent cb9a0c5 commit 9cb4530
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/parser/classes/Playlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -20,6 +21,7 @@ class Playlist extends YTNode {
badges;
endpoint: NavigationEndpoint;
thumbnail_overlays;
view_playlist?: NavigatableText;

constructor(data: any) {
super();
Expand All @@ -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);
}
}
}

Expand Down

0 comments on commit 9cb4530

Please sign in to comment.