mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-16 02:52:12 +00:00
* tests: improve coverage * refactor: clean up nodes * chore: lint * feat(parser): ignore `BrandVideoShelf` Seems to be used for ads. * feat(parser): ignore `BrandVideoSingleton` too
27 lines
690 B
TypeScript
27 lines
690 B
TypeScript
import Text from './misc/Text.js';
|
|
import { YTNode } from '../helpers.js';
|
|
import type { RawNode } from '../index.js';
|
|
|
|
export default class MusicDescriptionShelf extends YTNode {
|
|
static type = 'MusicDescriptionShelf';
|
|
|
|
description: Text;
|
|
max_collapsed_lines?: string;
|
|
max_expanded_lines?: string;
|
|
footer: Text;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
this.description = new Text(data.description);
|
|
|
|
if (Reflect.has(data, 'maxCollapsedLines')) {
|
|
this.max_collapsed_lines = data.maxCollapsedLines;
|
|
}
|
|
|
|
if (Reflect.has(data, 'maxExpandedLines')) {
|
|
this.max_expanded_lines = data.maxExpandedLines;
|
|
}
|
|
|
|
this.footer = new Text(data.footer);
|
|
}
|
|
} |