mirror of
https://github.com/Jackett/Jackett
synced 2025-02-24 15:21:06 +00:00
Add ability to use appsettings.json
https://github.com/Jackett/Jackett/issues/3583
This commit is contained in:
parent
34dd2981b3
commit
a752a39230
4 changed files with 4 additions and 26 deletions
|
@ -107,6 +107,7 @@ namespace Jackett.Server
|
|||
|
||||
var builder = new ConfigurationBuilder();
|
||||
builder.AddInMemoryCollection(runtimeDictionary);
|
||||
builder.AddJsonFile(Path.Combine(configurationService.GetAppDataFolder(), "appsettings.json"), optional: true);
|
||||
|
||||
Configuration = builder.Build();
|
||||
|
||||
|
@ -179,11 +180,11 @@ namespace Jackett.Server
|
|||
|
||||
public static IWebHostBuilder CreateWebHostBuilder(string[] args, string[] urls, string contentRoot) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
.UseConfiguration(Configuration)
|
||||
.UseContentRoot(contentRoot)
|
||||
.UseWebRoot(contentRoot)
|
||||
.UseUrls(urls)
|
||||
.PreferHostingUrls(true)
|
||||
.UseConfiguration(Configuration)
|
||||
.UseStartup<Startup>()
|
||||
.UseNLog();
|
||||
}
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"Logging": {
|
||||
"IncludeScopes": false,
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"Logging": {
|
||||
"IncludeScopes": false,
|
||||
"Debug": {
|
||||
"LogLevel": {
|
||||
"Default": "Warning"
|
||||
}
|
||||
},
|
||||
"Console": {
|
||||
"LogLevel": {
|
||||
"Default": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -233,6 +233,8 @@ namespace Jackett.Updater
|
|||
"Definitions/torrentwtf.yml",
|
||||
"Definitions/eotforum.yml",
|
||||
"Definitions/nexttorrent.yml",
|
||||
"appsettings.Development.json",
|
||||
"appsettings.json",
|
||||
};
|
||||
|
||||
foreach (var oldFile in oldFiles)
|
||||
|
|
Loading…
Reference in a new issue