vimeo: use api to get video info, direct download if possible (#612)

This commit is contained in:
jj
2024-07-07 14:25:17 +02:00
committed by GitHub
parent eb65e816af
commit 216529bfdf
3 changed files with 111 additions and 26 deletions

View File

@@ -44,3 +44,17 @@ export function cleanHTML(html) {
clean = clean.replace(/\n/g, '');
return clean
}
export function merge(a, b) {
for (const k of Object.keys(b)) {
if (Array.isArray(b[k])) {
a[k] = [...(a[k] ?? []), ...b[k]];
} else if (typeof b[k] === 'object') {
a[k] = merge(a[k], b[k]);
} else {
a[k] = b[k];
}
}
return a;
}