Artist images showing in list

This commit is contained in:
simojenki
2021-03-13 16:04:53 +11:00
parent a62abd3888
commit afa8132daa
11 changed files with 1367 additions and 178 deletions

View File

@@ -25,7 +25,6 @@ export type AuthFailure = {
export type ArtistSummary = {
id: string;
name: string;
image: Images;
};
export type Images = {
@@ -41,6 +40,7 @@ export const NO_IMAGES: Images = {
};
export type Artist = ArtistSummary & {
image: Images
albums: AlbumSummary[];
};
@@ -95,7 +95,6 @@ export type AlbumQuery = Paging & {
export const artistToArtistSummary = (it: Artist): ArtistSummary => ({
id: it.id,
name: it.name,
image: it.image,
});
export const albumToAlbumSummary = (it: Album): AlbumSummary => ({
@@ -145,5 +144,5 @@ export interface MusicLibrary {
trackId: string;
range: string | undefined;
}): Promise<Stream>;
coverArt(id: string, size?: number): Promise<CoverArt>;
coverArt(id: string, type: "album" | "artist", size?: number): Promise<CoverArt | undefined>;
}