mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 04:21:35 +00:00
feat(RichShelf): Add icon_type property
Useful for identifying Short content shelves.
This commit is contained in:
@@ -18,6 +18,7 @@ export default class RichShelf extends YTNode {
|
||||
| 'RICH_GRID_LAYOUT_SIZING_COMPACT'
|
||||
| 'RICH_GRID_LAYOUT_SIZING_EXTRA_COMPACT'
|
||||
| 'RICH_GRID_LAYOUT_SIZING_TINY';
|
||||
public icon_type?: string;
|
||||
public menu: YTNode | null;
|
||||
public next_button: YTNode | null;
|
||||
public previous_button: YTNode | null;
|
||||
@@ -43,6 +44,10 @@ export default class RichShelf extends YTNode {
|
||||
this.layout_sizing = data.layoutSizing;
|
||||
}
|
||||
|
||||
if ('icon' in data) {
|
||||
this.icon_type = data.icon.iconType;
|
||||
}
|
||||
|
||||
this.menu = Parser.parseItem(data.menu);
|
||||
this.next_button = Parser.parseItem(data.nextButton);
|
||||
this.previous_button = Parser.parseItem(data.previousButton);
|
||||
|
||||
Reference in New Issue
Block a user