mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Remove Static Configuration Class and .NET Core Prep (#2122)
* Remove static configuration class that required prior knowledge of when it was initialised to dependency injected method that ensures all configuration has already occured. * Specify a different log name for the updater, require a path when running the Jackett updater * Update to all .NET Standard packages * Explicitly specify the restore project style * Move automapper out of the DI framework and put crude detection to prevent it from initializing more than once.
This commit is contained in:

committed by
flightlevel

parent
fe504ed660
commit
1c62504b22
51
src/Jackett.Common/Models/Config/RuntimeSettings.cs
Normal file
51
src/Jackett.Common/Models/Config/RuntimeSettings.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace Jackett.Common.Models.Config
|
||||
{
|
||||
public class RuntimeSettings
|
||||
{
|
||||
public bool TracingEnabled { get; set; }
|
||||
|
||||
public bool LogRequests { get; set; }
|
||||
|
||||
public string ClientOverride { get; set; }
|
||||
|
||||
public string ProxyConnection { get; set; }
|
||||
|
||||
public bool? DoSSLFix { get; set; }
|
||||
|
||||
public bool? IgnoreSslErrors { get; set; }
|
||||
|
||||
public string CustomDataFolder { get; set; }
|
||||
|
||||
public string BasePath { get; set; }
|
||||
|
||||
public bool NoRestart { get; set; }
|
||||
|
||||
public string CustomLogFileName { get; set; }
|
||||
|
||||
|
||||
public string DataFolder
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(this.CustomDataFolder))
|
||||
{
|
||||
return this.CustomDataFolder;
|
||||
}
|
||||
|
||||
if (System.Environment.OSVersion.Platform == PlatformID.Unix)
|
||||
{
|
||||
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Jackett");
|
||||
}
|
||||
else
|
||||
{
|
||||
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Jackett");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user