Artwork reader for Artist

This commit is contained in:
Deluan 2022-12-31 16:58:07 -05:00 committed by Deluan Quintão
parent bf461473ef
commit 918fee3ea3
11 changed files with 99 additions and 24 deletions

View file

@ -34,6 +34,10 @@ func (a Artist) ArtistImageUrl() string {
return a.SmallImageUrl
}
func (a Artist) CoverArtID() ArtworkID {
return artworkIDFromArtist(a)
}
type Artists []Artist
type ArtistIndex struct {

View file

@ -82,3 +82,10 @@ func artworkIDFromPlaylist(pls Playlist) ArtworkID {
ID: pls.ID,
}
}
func artworkIDFromArtist(ar Artist) ArtworkID {
return ArtworkID{
Kind: KindArtistArtwork,
ID: ar.ID,
}
}