mirror of
https://github.com/jeffvli/feishin.git
synced 2024-11-20 06:27:09 +01:00
Encode credential for subsonic stream/coverart (#841)
This commit is contained in:
parent
21f4a78dd7
commit
8ec4551b46
@ -24,14 +24,15 @@ const getCoverArtUrl = (args: {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
const url =
|
||||
`${args.baseUrl}/rest/getCoverArt.view` +
|
||||
`?id=${args.coverArtId}` +
|
||||
`&${args.credential}` +
|
||||
`&${encodeURIComponent(args.credential || '')}` +
|
||||
'&v=1.13.0' +
|
||||
'&c=feishin' +
|
||||
`&size=${size}`
|
||||
);
|
||||
`&size=${size}`;
|
||||
|
||||
return url;
|
||||
};
|
||||
|
||||
const normalizeSong = (
|
||||
@ -48,7 +49,7 @@ const normalizeSong = (
|
||||
size: size || 300,
|
||||
}) || null;
|
||||
|
||||
const streamUrl = `${server?.url}/rest/stream.view?id=${item.id}&v=1.13.0&c=feishin_${deviceId}&${server?.credential}`;
|
||||
const streamUrl = `${server?.url}/rest/stream.view?id=${item.id}&v=1.13.0&c=feishin_${deviceId}&${encodeURIComponent(server?.credential || '')}`;
|
||||
|
||||
return {
|
||||
album: item.album || '',
|
||||
|
Loading…
Reference in New Issue
Block a user