feat(Parser): add support for parsing subtitle for RichShelf (#805)

This commit is contained in:
ChunkyProgrammer
2024-11-19 02:43:03 -05:00
committed by GitHub
parent 4b178e4bfb
commit 038efff17f

View File

@@ -9,6 +9,7 @@ export default class RichShelf extends YTNode {
title: Text;
contents: ObservedArray<YTNode>;
endpoint?: NavigationEndpoint;
subtitle?: Text;
constructor(data: RawNode) {
super();
@@ -18,5 +19,9 @@ export default class RichShelf extends YTNode {
if (Reflect.has(data, 'endpoint')) {
this.endpoint = new NavigationEndpoint(data.endpoint);
}
if (Reflect.has(data, 'subtitle')) {
this.subtitle = new Text(data.subtitle);
}
}
}