feat: add configurable parallel video uploads
Allow up to four video upload connections while keeping one connection as the default. Preserve existing messaging interfaces and add configuration controls, reliable failure handling, and upload diagnostics. Closes #569
This commit is contained in:
18 files changed
+1182
-217
No files matched your search
@@ -527,6 +527,10 @@ function prepareGlobalSettingsJson(
|
||||
const normalized = normalizeGlobalSettings(raw);
|
||||
const canonical: Record<string, unknown> = { rkey: normalized.rkey };
|
||||
|
||||
if (isPlainObject(raw) && Object.prototype.hasOwnProperty.call(raw, 'videoUploadConcurrency')) {
|
||||
canonical.videoUploadConcurrency = normalized.videoUploadConcurrency;
|
||||
}
|
||||
|
||||
// Missing is the existing one-shot migration sentinel: startup scans legacy
|
||||
// onebot*.json only until snowluma.json first carries this key.
|
||||
if (isPlainObject(raw) && Object.prototype.hasOwnProperty.call(raw, 'musicSignUrl')) {
|
||||
|
||||
@@ -2173,6 +2173,11 @@ export async function initWebUI(
|
||||
'save global config failed: %s',
|
||||
err instanceof Error ? err.message : String(err),
|
||||
);
|
||||
|
||||
if (err instanceof RangeError) {
|
||||
return c.json({ success: false, message: err.message }, 400);
|
||||
}
|
||||
|
||||
return c.json({ success: false, message: '保存失败,请检查服务器日志' }, 500);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user