From 427db5bbc2bf3e8ec60371d504c2ab1cdae6e918 Mon Sep 17 00:00:00 2001 From: Patrick Kan <55383971+patrickkfkan@users.noreply.github.com> Date: Mon, 13 Mar 2023 05:04:35 +0800 Subject: [PATCH] feat(parser): Add `play_all_button` to `Shelf` (#345) --- src/parser/classes/Shelf.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/parser/classes/Shelf.ts b/src/parser/classes/Shelf.ts index b4cfc4c6..0bf04519 100644 --- a/src/parser/classes/Shelf.ts +++ b/src/parser/classes/Shelf.ts @@ -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'; @@ -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(); @@ -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