feat: add reliable OpenList segment uploads
This commit is contained in:
@@ -58,6 +58,8 @@ public sealed class SystemSettingsService : ISystemSettingsService
|
||||
private const string OpenListUsernameKey = "upload.openlist.username";
|
||||
private const string OpenListPasswordKey = "upload.openlist.password";
|
||||
private const string OpenListBasePathKey = "upload.openlist.base_path";
|
||||
private const string OpenListSourcePathKey = "upload.openlist.source_path";
|
||||
private const string OpenListDestinationPathKey = "upload.openlist.destination_path";
|
||||
private const string DouyinProxyEnabledKey = "platform_proxy.douyin.enabled";
|
||||
private const string DouyinProxyUrlKey = "platform_proxy.douyin.url";
|
||||
private const string BilibiliProxyEnabledKey = "platform_proxy.bilibili.enabled";
|
||||
@@ -189,7 +191,12 @@ public sealed class SystemSettingsService : ISystemSettingsService
|
||||
BaseUrl = GetValue(lookup, OpenListBaseUrlKey, string.Empty),
|
||||
Username = GetValue(lookup, OpenListUsernameKey, string.Empty),
|
||||
Password = GetValue(lookup, OpenListPasswordKey, string.Empty),
|
||||
BasePath = GetValue(lookup, OpenListBasePathKey, string.Empty)
|
||||
BasePath = GetValue(lookup, OpenListBasePathKey, string.Empty),
|
||||
SourcePath = GetValue(lookup, OpenListSourcePathKey, string.Empty),
|
||||
DestinationPath = GetValue(
|
||||
lookup,
|
||||
OpenListDestinationPathKey,
|
||||
GetValue(lookup, OpenListBasePathKey, string.Empty))
|
||||
},
|
||||
EnableEventScripts = bool.TryParse(GetValue(lookup, EnableEventScriptsKey, "false"), out var enableEventScripts) && enableEventScripts,
|
||||
EnableLiveStartedScript = GetEventScriptEnabled(
|
||||
@@ -363,7 +370,12 @@ public sealed class SystemSettingsService : ISystemSettingsService
|
||||
await UpsertAsync(OpenListBaseUrlKey, openListUpload.BaseUrl.Trim(), now, cancellationToken);
|
||||
await UpsertAsync(OpenListUsernameKey, openListUpload.Username.Trim(), now, cancellationToken);
|
||||
await UpsertAsync(OpenListPasswordKey, openListUpload.Password, now, cancellationToken);
|
||||
await UpsertAsync(OpenListBasePathKey, openListUpload.BasePath.Trim(), now, cancellationToken);
|
||||
var openListDestinationPath = string.IsNullOrWhiteSpace(openListUpload.DestinationPath)
|
||||
? openListUpload.BasePath.Trim()
|
||||
: openListUpload.DestinationPath.Trim();
|
||||
await UpsertAsync(OpenListBasePathKey, openListDestinationPath, now, cancellationToken);
|
||||
await UpsertAsync(OpenListSourcePathKey, openListUpload.SourcePath.Trim(), now, cancellationToken);
|
||||
await UpsertAsync(OpenListDestinationPathKey, openListDestinationPath, now, cancellationToken);
|
||||
foreach (var platformDefinition in LivePlatformCatalog.All)
|
||||
{
|
||||
var platformRequestSettings = request.GetPlatformRequestSettings(platformDefinition.Type);
|
||||
|
||||
Reference in New Issue
Block a user