parseArtistAlbum static method

AlbumDetailed parseArtistAlbum(
  1. dynamic item,
  2. ArtistBasic artistBasic
)

Implementation

static AlbumDetailed parseArtistAlbum(dynamic item, ArtistBasic artistBasic) {
  return AlbumDetailed(
    type: "ALBUM",
    albumId: traverseList(item, ["browseId"])
            .where((element) => element != artistBasic.artistId)
            .firstOrNull ??
        '',
    playlistId:
        traverseString(item, ["thumbnailOverlay", "playlistId"]) ?? '',
    name: traverseString(item, ["title", "text"]) ?? '',
    artist: artistBasic,
    year: processYear(traverseList(item, ["subtitle", "text"]).last),
    thumbnails: traverseList(item, ["thumbnails"])
        .map((item) => ThumbnailFull.fromMap(item))
        .toList(),
  );
}