mirror of
https://github.com/Jackett/Jackett
synced 2025-02-24 23:22:46 +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();
|
var builder = new ConfigurationBuilder();
|
||||||
builder.AddInMemoryCollection(runtimeDictionary);
|
builder.AddInMemoryCollection(runtimeDictionary);
|
||||||
|
builder.AddJsonFile(Path.Combine(configurationService.GetAppDataFolder(), "appsettings.json"), optional: true);
|
||||||
|
|
||||||
Configuration = builder.Build();
|
Configuration = builder.Build();
|
||||||
|
|
||||||
|
@ -179,11 +180,11 @@ namespace Jackett.Server
|
||||||
|
|
||||||
public static IWebHostBuilder CreateWebHostBuilder(string[] args, string[] urls, string contentRoot) =>
|
public static IWebHostBuilder CreateWebHostBuilder(string[] args, string[] urls, string contentRoot) =>
|
||||||
WebHost.CreateDefaultBuilder(args)
|
WebHost.CreateDefaultBuilder(args)
|
||||||
.UseConfiguration(Configuration)
|
|
||||||
.UseContentRoot(contentRoot)
|
.UseContentRoot(contentRoot)
|
||||||
.UseWebRoot(contentRoot)
|
.UseWebRoot(contentRoot)
|
||||||
.UseUrls(urls)
|
.UseUrls(urls)
|
||||||
.PreferHostingUrls(true)
|
.PreferHostingUrls(true)
|
||||||
|
.UseConfiguration(Configuration)
|
||||||
.UseStartup<Startup>()
|
.UseStartup<Startup>()
|
||||||
.UseNLog();
|
.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/torrentwtf.yml",
|
||||||
"Definitions/eotforum.yml",
|
"Definitions/eotforum.yml",
|
||||||
"Definitions/nexttorrent.yml",
|
"Definitions/nexttorrent.yml",
|
||||||
|
"appsettings.Development.json",
|
||||||
|
"appsettings.json",
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach (var oldFile in oldFiles)
|
foreach (var oldFile in oldFiles)
|
||||||
|
|
Loading…
Reference in a new issue