From 61a95cf821f5de977caa54085a75efcbd1e4556c Mon Sep 17 00:00:00 2001 From: patrickkfkan Date: Fri, 10 Mar 2023 04:23:30 +0800 Subject: [PATCH] feat(parser): Add `play_all_button` to `Shelf` --- 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 b4cfc4c6a..0bf045198 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