mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 03:32:20 +08:00
parent
1f6f6216c5
commit
2ed57ec9ac
|
@ -129,10 +129,19 @@ namespace BililiveRecorder.Cli
|
||||||
ConfigV3? config;
|
ConfigV3? config;
|
||||||
|
|
||||||
if (args.ConfigOverride is not null)
|
if (args.ConfigOverride is not null)
|
||||||
|
{
|
||||||
|
if (Directory.Exists(args.ConfigOverride))
|
||||||
|
{
|
||||||
|
var overrideFile = Path.Combine(args.ConfigOverride, "config.json");
|
||||||
|
logger.Information("Using config from {ConfigOverride}", overrideFile);
|
||||||
|
config = ConfigParser.LoadFromFile(overrideFile);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
logger.Information("Using config from {ConfigOverride}", args.ConfigOverride);
|
logger.Information("Using config from {ConfigOverride}", args.ConfigOverride);
|
||||||
config = ConfigParser.LoadFromFile(args.ConfigOverride);
|
config = ConfigParser.LoadFromFile(args.ConfigOverride);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
config = ConfigParser.LoadFromDirectory(path);
|
config = ConfigParser.LoadFromDirectory(path);
|
||||||
|
@ -231,7 +240,8 @@ namespace BililiveRecorder.Cli
|
||||||
services.AddSingleton(new BasicAuthCredential(sharedArguments.HttpBasicUser ?? string.Empty, sharedArguments.HttpBasicPass ?? string.Empty));
|
services.AddSingleton(new BasicAuthCredential(sharedArguments.HttpBasicUser ?? string.Empty, sharedArguments.HttpBasicPass ?? string.Empty));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sharedArguments.HttpOpenAccess || Environment.GetEnvironmentVariable("BREC_HTTP_OPEN_ACCESS") is not null){
|
if (sharedArguments.HttpOpenAccess || Environment.GetEnvironmentVariable("BREC_HTTP_OPEN_ACCESS") is not null)
|
||||||
|
{
|
||||||
services.AddSingleton(new DisableOpenAccessWarningConfig());
|
services.AddSingleton(new DisableOpenAccessWarningConfig());
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user