feat: add cache to the getCoverArt endpoint, avoid it being reloaded every single time in the UI

This commit is contained in:
Deluan
2020-02-15 14:20:04 -05:00
parent 272d897ec9
commit 3b12c92ad5
4 changed files with 23 additions and 15 deletions
+3 -3
View File
@@ -10,9 +10,9 @@ const PLAYER_PLAY_ALBUM = 'PLAYER_PLAY_ALBUM'
const mapToAudioLists = (item) => ({
name: item.title,
singer: item.artist,
cover: subsonicUrl('getCoverArt', item.id, 'size=300'),
musicSrc: subsonicUrl('stream', item.id),
scrobble: (submit) => subsonicUrl('scrobble', item.id, `submission=${submit}`)
cover: subsonicUrl('getCoverArt', item.id, { size: 300 }),
musicSrc: subsonicUrl('stream', item.id, { ts: true }),
scrobble: (submit) => subsonicUrl('scrobble', item.id, { submission: submit })
})
const addTrack = (data) => ({