mirror of
https://github.com/navidrome/navidrome.git
synced 2025-05-07 05:41:07 +03:00
Request album covers when DevFastAccessCoverArt is true
This commit is contained in:
parent
d6066c514d
commit
666b058ce4
@ -36,6 +36,7 @@ func serveIndex(ds model.DataStore, fs http.FileSystem) http.HandlerFunc {
|
||||
"gaTrackingId": conf.Server.GATrackingID,
|
||||
"enableDownloads": conf.Server.EnableDownloads,
|
||||
"devActivityMenu": conf.Server.DevActivityMenu,
|
||||
"devFastAccessCoverArt": conf.Server.DevFastAccessCoverArt,
|
||||
}
|
||||
j, err := json.Marshal(appConfig)
|
||||
if err != nil {
|
||||
|
@ -11,6 +11,7 @@ const defaultConfig = {
|
||||
welcomeMessage: '',
|
||||
gaTrackingId: '',
|
||||
devActivityMenu: true,
|
||||
devFastAccessCoverArt: false,
|
||||
}
|
||||
|
||||
let config
|
||||
|
@ -2,6 +2,7 @@ import 'react-jinke-music-player/assets/index.css'
|
||||
import get from 'lodash.get'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
import subsonic from '../subsonic'
|
||||
import config from '../config'
|
||||
|
||||
import {
|
||||
PLAYER_CLEAR_QUEUE,
|
||||
@ -25,8 +26,12 @@ const mapToAudioLists = (item) => {
|
||||
albumId: item.albumId,
|
||||
artistId: item.albumArtistId,
|
||||
duration: item.duration,
|
||||
cover: subsonic.url('getCoverArt', id, { size: 300 }),
|
||||
musicSrc: subsonic.url('stream', id, { ts: true }),
|
||||
cover: subsonic.url(
|
||||
'getCoverArt',
|
||||
config.devFastAccessCoverArt ? item.albumId : id,
|
||||
{ size: 300 }
|
||||
),
|
||||
scrobbled: false,
|
||||
uuid: uuidv4(),
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user