diff --git a/ui/src/reducers/playQueue.js b/ui/src/reducers/playQueue.js index 2855a1681..b425145c9 100644 --- a/ui/src/reducers/playQueue.js +++ b/ui/src/reducers/playQueue.js @@ -28,7 +28,7 @@ const mapToAudioLists = (item) => { duration: item.duration, suffix: item.suffix, bitRate: item.bitRate, - musicSrc: subsonic.url('stream', id, { ts: true }), + musicSrc: subsonic.streamUrl(id), cover: subsonic.getCoverArtUrl( { coverArtId: config.devFastAccessCoverArt ? item.albumId : id, diff --git a/ui/src/subsonic/index.js b/ui/src/subsonic/index.js index 176122e21..b08bcf398 100644 --- a/ui/src/subsonic/index.js +++ b/ui/src/subsonic/index.js @@ -45,6 +45,10 @@ const getCoverArtUrl = (record, size) => { return baseUrl(url('getCoverArt', record.coverArtId || 'not_found', options)) } +const streamUrl = (id) => { + return baseUrl(url('stream', id, { ts: true })) +} + export default { url, scrobble, @@ -55,4 +59,5 @@ export default { startScan, getScanStatus, getCoverArtUrl, + streamUrl, }