From 5a95acbd8fab594c6fe6504731c314eb1091f531 Mon Sep 17 00:00:00 2001 From: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> Date: Wed, 30 Oct 2024 15:33:28 -0400 Subject: [PATCH] feat(Parser): Add support for parsing subtitle for `Shelf` --- src/parser/classes/Shelf.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/parser/classes/Shelf.ts b/src/parser/classes/Shelf.ts index 849fe7e48..5a520e648 100644 --- a/src/parser/classes/Shelf.ts +++ b/src/parser/classes/Shelf.ts @@ -13,6 +13,7 @@ export default class Shelf extends YTNode { icon_type?: string; menu?: YTNode | null; play_all_button?: Button | null; + subtitle?: Text; constructor(data: RawNode) { super(); @@ -35,5 +36,9 @@ export default class Shelf extends YTNode { if (Reflect.has(data, 'playAllButton')) { this.play_all_button = Parser.parseItem(data.playAllButton, Button); } + + if (Reflect.has(data, 'subtitle')) { + this.subtitle = new Text(data.subtitle); + } } } \ No newline at end of file