feat(Parser): Add support for parsing subtitle for Shelf (#792)

This commit is contained in:
ChunkyProgrammer
2024-10-30 15:48:29 -04:00
committed by GitHub
parent a4394dbb82
commit 34ae38cbf4

View File

@@ -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);
}
}
}