Handle mediafile covers

This commit is contained in:
Deluan 2022-12-20 10:53:52 -05:00 committed by Deluan Quintão
parent 213ceeca78
commit 87d4db7638
4 changed files with 93 additions and 14 deletions

View file

@ -74,6 +74,10 @@ func (mf MediaFile) CoverArtID() ArtworkID {
return artworkIDFromMediaFile(mf)
}
// if it does not have a coverArt, fallback to the album cover
return mf.AlbumCoverArtID()
}
func (mf MediaFile) AlbumCoverArtID() ArtworkID {
return artworkIDFromAlbum(Album{ID: mf.AlbumID, UpdatedAt: mf.UpdatedAt})
}