parseHomeSection static method
Implementation
static AlbumDetailed parseHomeSection(dynamic item) {
final artist = traverse(item, ["subtitle", "runs"]).last;
return AlbumDetailed(
type: "ALBUM",
albumId: traverseString(item, ["title", "browseId"]) ?? '',
playlistId:
traverseString(item, ["thumbnailOverlay", "playlistId"]) ?? '',
name: traverseString(item, ["title", "text"]) ?? '',
artist: ArtistBasic(
name: traverseString(artist, ["text"]) ?? '',
artistId: traverseString(artist, ["browseId"]) ?? '',
),
year: null,
thumbnails: traverseList(item, ["thumbnails"])
.map((item) => ThumbnailFull.fromMap(item))
.toList(),
);
}