api: return covers from soundcloud and youtube

& refactor createProxyTunnels() in stream/manage a little
This commit is contained in:
wukko
2025-06-26 17:36:26 +06:00
parent 4ff4766bda
commit 164ea8aeb9
5 changed files with 42 additions and 10 deletions

View File

@@ -146,8 +146,14 @@ export default async function(obj) {
copyright: json.license?.trim(),
}
let cover;
if (json.artwork_url) {
cover = json.artwork_url.replace(/-large/, "-t1080x1080");
}
return {
urls: file.toString(),
cover,
filenameAttributes: {
service: "soundcloud",
id: json.id,