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 null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
const url =
|
||||||
`${args.baseUrl}/rest/getCoverArt.view` +
|
`${args.baseUrl}/rest/getCoverArt.view` +
|
||||||
`?id=${args.coverArtId}` +
|
`?id=${args.coverArtId}` +
|
||||||
`&${args.credential}` +
|
`&${encodeURIComponent(args.credential || '')}` +
|
||||||
'&v=1.13.0' +
|
'&v=1.13.0' +
|
||||||
'&c=feishin' +
|
'&c=feishin' +
|
||||||
`&size=${size}`
|
`&size=${size}`;
|
||||||
);
|
|
||||||
|
return url;
|
||||||
};
|
};
|
||||||
|
|
||||||
const normalizeSong = (
|
const normalizeSong = (
|
||||||
@ -48,7 +49,7 @@ const normalizeSong = (
|
|||||||
size: size || 300,
|
size: size || 300,
|
||||||
}) || null;
|
}) || 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 {
|
return {
|
||||||
album: item.album || '',
|
album: item.album || '',
|
||||||
|
Loading…
Reference in New Issue
Block a user