Fix `stream` url, after changes to subsonic client api

This commit is contained in:
Deluan 2021-06-16 16:38:50 -04:00
parent c4623d7bc3
commit b590c31e4e
2 changed files with 6 additions and 1 deletions

View File

@ -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,

View File

@ -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,
}