vimeo: use api to get video info, direct download if possible (#612)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user