mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Feature/netcore preparation (#2072)
* Use platform detection that works on mono 4.6+ * Move to use package reference for restoring nuget packages. * DateTimeRoutines does not have Nuget packages that support .NET Standard (and therefore .NET Core). We will have to include them for now until we can get rid of this dependency. * Start spliting some interfaces into their own files - this will help by allowing us to split them out in the future into a seperate project so the actual implementations can stay within their respective architectures when required * Move out common libraries * Few more tidy up tasks to get things working with .NET Standard * Restructure the solution layout * Encoding work to reduce rework later on platforms without Windows codepages (or require compliance with RFC1345) * Move folder structure around to have more natural layout of the solutions * DI server configuration to get rid of "temporary" hack and dependency circle for serverservice * Make all encoding consistent to match the expected encoding casing for earlier versions of mono.
This commit is contained in:

committed by
flightlevel

parent
47a2ffa313
commit
571c52a0f2
53
src/Jackett.Common/Models/DTO/ServerConfig.cs
Normal file
53
src/Jackett.Common/Models/DTO/ServerConfig.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System.Collections.Generic;
|
||||
using Jacket.Common;
|
||||
using Jackett.Services;
|
||||
|
||||
namespace Jackett.Models.DTO
|
||||
{
|
||||
public class ServerConfig
|
||||
{
|
||||
public IEnumerable<string> notices { get; set; }
|
||||
public int port { get; set; }
|
||||
public bool external { get; set; }
|
||||
public string api_key { get; set; }
|
||||
public string blackholedir { get; set; }
|
||||
public bool updatedisabled { get; set; }
|
||||
public bool prerelease { get; set; }
|
||||
public string password { get; set; }
|
||||
public bool logging { get; set; }
|
||||
public string basepathoverride { get; set; }
|
||||
public string omdbkey { get; set; }
|
||||
public string app_version { get; set; }
|
||||
|
||||
public string proxy_url { get; set; }
|
||||
public int? proxy_port { get; set; }
|
||||
public string proxy_username { get; set; }
|
||||
public string proxy_password { get; set; }
|
||||
|
||||
public ServerConfig()
|
||||
{
|
||||
notices = new string[0];
|
||||
}
|
||||
|
||||
public ServerConfig(IEnumerable<string> notices, Models.Config.ServerConfig config, string version)
|
||||
{
|
||||
this.notices = notices;
|
||||
port = config.Port;
|
||||
external = config.AllowExternal;
|
||||
api_key = config.APIKey;
|
||||
blackholedir = config.BlackholeDir;
|
||||
updatedisabled = config.UpdateDisabled;
|
||||
prerelease = config.UpdatePrerelease;
|
||||
password = string.IsNullOrEmpty(config.AdminPassword) ? string.Empty : config.AdminPassword.Substring(0, 10);
|
||||
logging = JackettStartup.TracingEnabled;
|
||||
basepathoverride = config.BasePathOverride;
|
||||
omdbkey = config.OmdbApiKey;
|
||||
app_version = version;
|
||||
|
||||
proxy_url = config.ProxyUrl;
|
||||
proxy_port = config.ProxyPort;
|
||||
proxy_username = config.ProxyUsername;
|
||||
proxy_password = config.ProxyPassword;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user