Fix DevFastAccessCoverArt flag

This commit is contained in:
Deluan
2022-12-22 11:47:18 -05:00
committed by Deluan Quintão
parent 57c3334ea0
commit 045b023b35
5 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ func (a *artwork) extractMediaFileImage(ctx context.Context, artID model.Artwork
} }
var ff []fromFunc var ff []fromFunc
if mf.HasCoverArt { if mf.CoverArtID().Kind == model.KindMediaFileArtwork {
ff = []fromFunc{ ff = []fromFunc{
fromTag(mf.Path), fromTag(mf.Path),
fromFFmpegTag(ctx, a.ffmpeg, mf.Path), fromFFmpegTag(ctx, a.ffmpeg, mf.Path),
-1
View File
@@ -45,7 +45,6 @@ func serveIndex(ds model.DataStore, fs fs.FS) http.HandlerFunc {
"gaTrackingId": conf.Server.GATrackingID, "gaTrackingId": conf.Server.GATrackingID,
"losslessFormats": strings.ToUpper(strings.Join(consts.LosslessFormats, ",")), "losslessFormats": strings.ToUpper(strings.Join(consts.LosslessFormats, ",")),
"devActivityPanel": conf.Server.DevActivityPanel, "devActivityPanel": conf.Server.DevActivityPanel,
"devFastAccessCoverArt": conf.Server.DevFastAccessCoverArt,
"enableUserEditing": conf.Server.EnableUserEditing, "enableUserEditing": conf.Server.EnableUserEditing,
"devEnableShare": conf.Server.DevEnableShare, "devEnableShare": conf.Server.DevEnableShare,
"devSidebarPlaylists": conf.Server.DevSidebarPlaylists, "devSidebarPlaylists": conf.Server.DevSidebarPlaylists,
-1
View File
@@ -15,7 +15,6 @@ const defaultConfig = {
welcomeMessage: '', welcomeMessage: '',
gaTrackingId: '', gaTrackingId: '',
devActivityPanel: true, devActivityPanel: true,
devFastAccessCoverArt: false,
enableStarRating: true, enableStarRating: true,
defaultTheme: 'Dark', defaultTheme: 'Dark',
defaultLanguage: '', defaultLanguage: '',
+1 -1
View File
@@ -37,7 +37,7 @@ const mapToAudioLists = (item) => {
musicSrc: subsonic.streamUrl(trackId), musicSrc: subsonic.streamUrl(trackId),
cover: subsonic.getCoverArtUrl( cover: subsonic.getCoverArtUrl(
{ {
id: config.devFastAccessCoverArt ? item.albumId : trackId, id: trackId,
updatedAt: item.updatedAt, updatedAt: item.updatedAt,
album: item.album, album: item.album,
}, },
+1
View File
@@ -51,6 +51,7 @@ const getCoverArtUrl = (record, size) => {
...(size && { 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 lastUpdate = Math.floor(Date.parse(record.updatedAt) / 1000)
const id = record.id + '-' + Math.max(lastUpdate, 0).toString(16) const id = record.id + '-' + Math.max(lastUpdate, 0).toString(16)
if (record.album) { if (record.album) {