Skip to content

🎧 Your Personal Streaming Service

Fix `DevFastAccessCoverArt` flag

Deluan045b023b3508
diff --git a/core/artwork.go b/core/artwork.go
index c822144dc..f58889c9f 100644
--- a/core/artwork.go
+++ b/core/artwork.go
@@ -114,7 +114,7 @@ func (a *artwork) extractMediaFileImage(ctx context.Context, artID model.Artwork
}
var ff []fromFunc
- if mf.HasCoverArt {
+ if mf.CoverArtID().Kind == model.KindMediaFileArtwork {
ff = []fromFunc{
fromTag(mf.Path),
fromFFmpegTag(ctx, a.ffmpeg, mf.Path),
diff --git a/server/serve_index.go b/server/serve_index.go
index 01bc4adf7..f73cb414a 100644
--- a/server/serve_index.go
+++ b/server/serve_index.go
@@ -45,7 +45,6 @@ func serveIndex(ds model.DataStore, fs fs.FS) http.HandlerFunc {
"gaTrackingId": conf.Server.GATrackingID,
"losslessFormats": strings.ToUpper(strings.Join(consts.LosslessFormats, ",")),
"devActivityPanel": conf.Server.DevActivityPanel,
- "devFastAccessCoverArt": conf.Server.DevFastAccessCoverArt,
"enableUserEditing": conf.Server.EnableUserEditing,
"devEnableShare": conf.Server.DevEnableShare,
"devSidebarPlaylists": conf.Server.DevSidebarPlaylists,
diff --git a/ui/src/config.js b/ui/src/config.js
index 8ce1f59e7..1514d90c3 100644
--- a/ui/src/config.js
+++ b/ui/src/config.js
@@ -15,7 +15,6 @@ const defaultConfig = {
welcomeMessage: '',
gaTrackingId: '',
devActivityPanel: true,
- devFastAccessCoverArt: false,
enableStarRating: true,
defaultTheme: 'Dark',
defaultLanguage: '',
diff --git a/ui/src/reducers/playerReducer.js b/ui/src/reducers/playerReducer.js
index 8763e8a3d..dc642e527 100644
--- a/ui/src/reducers/playerReducer.js
+++ b/ui/src/reducers/playerReducer.js
@@ -37,7 +37,7 @@ const mapToAudioLists = (item) => {
musicSrc: subsonic.streamUrl(trackId),
cover: subsonic.getCoverArtUrl(
{
- id: config.devFastAccessCoverArt ? item.albumId : trackId,
+ id: trackId,
updatedAt: item.updatedAt,
album: item.album,
},
diff --git a/ui/src/subsonic/index.js b/ui/src/subsonic/index.js
index 6c10d590b..619024320 100644
--- a/ui/src/subsonic/index.js
+++ b/ui/src/subsonic/index.js
@@ -51,6 +51,7 @@ const getCoverArtUrl = (record, size) => {
...(size && { size }),
}
+ // TODO Move this logic to server. `song` and `album` should have a CoverArtID
const lastUpdate = Math.floor(Date.parse(record.updatedAt) / 1000)
const id = record.id + '-' + Math.max(lastUpdate, 0).toString(16)
if (record.album) {