mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-13 01:22:11 +00:00
feat(Parser): add support for parsing subtitle for RichShelf (#805)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user