Skip to content

Commit

Permalink
feat(parser): Add play_all_button to Shelf (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkfkan authored Mar 12, 2023
1 parent 2b29244 commit 427db5b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/parser/classes/Shelf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Text from './misc/Text.js';
import Parser from '../index.js';
import NavigationEndpoint from './NavigationEndpoint.js';
import { YTNode } from '../helpers.js';
import Button from './Button.js';

class Shelf extends YTNode {
static type = 'Shelf';
Expand All @@ -11,6 +12,7 @@ class Shelf extends YTNode {
content: YTNode | null;
icon_type?: string;
menu?: YTNode | null;
play_all_button?: Button | null;

constructor(data: any) {
super();
Expand All @@ -29,6 +31,10 @@ class Shelf extends YTNode {
if (data.menu) {
this.menu = Parser.parseItem(data.menu);
}

if (data.playAllButton) {
this.play_all_button = Parser.parseItem<Button>(data.playAllButton);
}
}
}

Expand Down

0 comments on commit 427db5b

Please sign in to comment.