feat(parser): Support LockupView and it's child nodes (#609)

This commit is contained in:
absidue
2024-02-29 17:29:53 +01:00
committed by GitHub
parent f95283b236
commit 7ca2a0c3e4
10 changed files with 179 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
import { YTNode } from '../helpers.js';
import { Parser, type RawNode } from '../index.js';
import ThumbnailView from './ThumbnailView.js';
export default class CollectionThumbnailView extends YTNode {
static type = 'CollectionThumbnailView';
primary_thumbnail: ThumbnailView | null;
stack_color: {
light_theme: number;
dark_theme: number;
};
constructor(data: RawNode) {
super();
this.primary_thumbnail = Parser.parseItem(data.primaryThumbnail, ThumbnailView);
this.stack_color = {
light_theme: data.stackColor.lightTheme,
dark_theme: data.stackColor.darkTheme
};
}
}