Load artwork from embedded

This commit is contained in:
Deluan
2022-12-19 15:34:21 -05:00
committed by Deluan Quintão
parent c36e77d41f
commit 7b87386089
8 changed files with 143 additions and 37 deletions
+2 -2
View File
@@ -69,11 +69,11 @@ func (mf MediaFile) ContentType() string {
}
func (mf MediaFile) CoverArtID() ArtworkID {
// If it is a mediaFile, and it has cover art, return it (if feature is disabled, skip)
// If it has a cover art, return it (if feature is disabled, skip)
if mf.HasCoverArt && !conf.Server.DevFastAccessCoverArt {
return artworkIDFromMediaFile(mf)
}
// if the mediaFile does not have a coverArt, fallback to the album cover
// if it does not have a coverArt, fallback to the album cover
return artworkIDFromAlbum(Album{ID: mf.AlbumID, UpdatedAt: mf.UpdatedAt})
}