mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-27 08:39:23 +00:00
Add end_icons to MusicCarouselShelfBasicHeader and fix music#getPlaylist() (#149)
* ft: add end_icons to MusicCarouselShelfBasicHeader * fix: `music#getPlaylist()` breaking playlist_id
This commit is contained in:
@@ -3,6 +3,7 @@ import { YTNode } from '../helpers';
|
||||
import MusicThumbnail from './MusicThumbnail';
|
||||
import Parser from '..';
|
||||
import Button from './Button';
|
||||
import IconLink from './IconLink';
|
||||
|
||||
class MusicCarouselShelfBasicHeader extends YTNode {
|
||||
static type = 'MusicCarouselShelfBasicHeader';
|
||||
@@ -11,6 +12,7 @@ class MusicCarouselShelfBasicHeader extends YTNode {
|
||||
title: Text;
|
||||
thumbnail?: MusicThumbnail | null;
|
||||
more_content?: Button | null;
|
||||
end_icons?: Array<IconLink>;
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
@@ -29,6 +31,10 @@ class MusicCarouselShelfBasicHeader extends YTNode {
|
||||
if (data.moreContentButton) {
|
||||
this.more_content = Parser.parseItem<Button>(data.moreContentButton, Button);
|
||||
}
|
||||
|
||||
if (data.endIcons) {
|
||||
this.end_icons = Parser.parseArray<IconLink>(data.endIcons, IconLink);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user