mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-27 00:29:16 +00:00
feat(ytmusic): music#Playlist fixes and additions (#138)
* feat: add MusicEditablePlaylistDetailHeader parser * feat: more info in `DropdownItem` * fix: empty `year` value in `MusicDetailHeader` * fix(ytmusic#Playlist): header err w/ own playlists * feat: include reload continuation in `MusicShelf` * feat(ytmusic): add getSuggestions() to Playlist
This commit is contained in:
@@ -7,8 +7,9 @@ class DropdownItem extends YTNode {
|
||||
|
||||
label: string;
|
||||
selected: boolean;
|
||||
value?: number;
|
||||
value?: number | string;
|
||||
iconType?: string;
|
||||
description?: string;
|
||||
endpoint?: NavigationEndpoint;
|
||||
|
||||
constructor(data: any) {
|
||||
@@ -19,6 +20,8 @@ class DropdownItem extends YTNode {
|
||||
|
||||
if (data.int32Value) {
|
||||
this.value = data.int32Value;
|
||||
} else if (data.stringValue) {
|
||||
this.value = data.stringValue;
|
||||
}
|
||||
|
||||
if (data.onSelectCommand?.browseEndpoint) {
|
||||
@@ -28,6 +31,10 @@ class DropdownItem extends YTNode {
|
||||
if (data.icon?.iconType) {
|
||||
this.iconType = data.icon?.iconType;
|
||||
}
|
||||
|
||||
if (data.descriptionText) {
|
||||
this.description = new Text(data.descriptionText).toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user