Fix DevFastAccessCoverArt flag
This commit is contained in:
+1
-1
@@ -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),
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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: '',
|
||||||
|
|||||||
@@ -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,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user