Skip to content

Commit

Permalink
feat(Parser): Add support for parsing subtitle for Shelf (#792)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunkyProgrammer authored Oct 30, 2024
1 parent a4394db commit 34ae38c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/parser/classes/Shelf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
}
}
}

0 comments on commit 34ae38c

Please sign in to comment.