mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-14 10:02:16 +00:00
26 lines
631 B
TypeScript
26 lines
631 B
TypeScript
import { YTNode } from '../helpers.js';
|
|
import type { RawNode } from '../index.js';
|
|
import { Text } from '../misc.js';
|
|
|
|
export type MetadataRow = {
|
|
metadata_parts: {
|
|
text: Text;
|
|
}[];
|
|
};
|
|
|
|
export default class ContentMetadataView extends YTNode {
|
|
static type = 'ContentMetadataView';
|
|
|
|
metadata_rows: MetadataRow[];
|
|
delimiter: string;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
this.metadata_rows = data.metadataRows.map((row: RawNode) => ({
|
|
metadata_parts: row.metadataParts.map((part: RawNode) => ({
|
|
text: Text.fromAttributed(part.text)
|
|
}))
|
|
}));
|
|
this.delimiter = data.delimiter;
|
|
}
|
|
} |