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:
Patrick Kan
2022-08-15 07:39:31 +08:00
committed by GitHub
parent 713fd13c74
commit dba34dc5ae
7 changed files with 80 additions and 9 deletions

View File

@@ -20,7 +20,9 @@ class MusicShelf extends YTNode {
this.title = new Text(data.title);
this.contents = Parser.parseArray<MusicResponsiveListItem>(data.contents, MusicResponsiveListItem);
this.endpoint = Reflect.has(data, 'bottomEndpoint') ? new NavigationEndpoint(data.bottomEndpoint) : null;
this.continuation = data.continuations?.[0]?.nextContinuationData?.continuation || null;
this.continuation =
data.continuations?.[0].nextContinuationData?.continuation ||
data.continuations?.[0].reloadContinuationData?.continuation || null;
this.bottom_text = Reflect.has(data, 'bottomText') ? new Text(data.bottomText) : null;
}
}