mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-25 15:52:13 +00:00
refactor: clean up parser and tests (#387)
* tests: improve coverage * refactor: clean up nodes * chore: lint * feat(parser): ignore `BrandVideoShelf` Seems to be used for ads. * feat(parser): ignore `BrandVideoSingleton` too
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
import Parser from '../index.js';
|
||||
import Parser, { type RawNode } from '../index.js';
|
||||
import PlaylistPanel from './PlaylistPanel.js';
|
||||
import { YTNode } from '../helpers.js';
|
||||
|
||||
class MusicQueue extends YTNode {
|
||||
export default class MusicQueue extends YTNode {
|
||||
static type = 'MusicQueue';
|
||||
|
||||
content: PlaylistPanel | null;
|
||||
|
||||
constructor(data: any) {
|
||||
constructor(data: RawNode) {
|
||||
super();
|
||||
this.content = Parser.parseItem<PlaylistPanel>(data.content, PlaylistPanel);
|
||||
this.content = Parser.parseItem(data.content, PlaylistPanel);
|
||||
}
|
||||
}
|
||||
|
||||
export default MusicQueue;
|
||||
}
|
||||
Reference in New Issue
Block a user