diff --git a/src/NzbDrone.Core/Configuration/IProxyConfigService.cs b/src/NzbDrone.Core/Configuration/IProxyConfigService.cs new file mode 100644 index 0000000000..15118d5d56 --- /dev/null +++ b/src/NzbDrone.Core/Configuration/IProxyConfigService.cs @@ -0,0 +1,16 @@ +using NzbDrone.Common.Http.Proxy; + +namespace NzbDrone.Core.Configuration +{ + public interface IProxyConfigService + { + bool ProxyEnabled { get; } + ProxyType ProxyType { get; } + string ProxyHostname { get; } + int ProxyPort { get; } + string ProxyUsername { get; } + string ProxyPassword { get; } + string ProxyBypassFilter { get; } + bool ProxyBypassLocalAddresses { get; } + } +} diff --git a/src/NzbDrone.Core/Configuration/IUIConfigService.cs b/src/NzbDrone.Core/Configuration/IUIConfigService.cs new file mode 100644 index 0000000000..aa12f3c23e --- /dev/null +++ b/src/NzbDrone.Core/Configuration/IUIConfigService.cs @@ -0,0 +1,16 @@ +namespace NzbDrone.Core.Configuration +{ + public interface IUIConfigService + { + int FirstDayOfWeek { get; set; } + string CalendarWeekColumnHeader { get; set; } + MovieRuntimeFormatType MovieRuntimeFormat { get; set; } + string ShortDateFormat { get; set; } + string LongDateFormat { get; set; } + string TimeFormat { get; set; } + bool ShowRelativeDates { get; set; } + bool EnableColorImpairedMode { get; set; } + int MovieInfoLanguage { get; set; } + int UILanguage { get; set; } + } +} diff --git a/src/NzbDrone.Core/Configuration/ProxyConfigService.cs b/src/NzbDrone.Core/Configuration/ProxyConfigService.cs new file mode 100644 index 0000000000..2be5c00634 --- /dev/null +++ b/src/NzbDrone.Core/Configuration/ProxyConfigService.cs @@ -0,0 +1,30 @@ +using NzbDrone.Common.Http.Proxy; + +namespace NzbDrone.Core.Configuration +{ + public class ProxyConfigService : IProxyConfigService + { + private readonly IConfigService _configService; + + public ProxyConfigService(IConfigService configService) + { + _configService = configService; + } + + public bool ProxyEnabled => _configService.ProxyEnabled; + + public ProxyType ProxyType => _configService.ProxyType; + + public string ProxyHostname => _configService.ProxyHostname; + + public int ProxyPort => _configService.ProxyPort; + + public string ProxyUsername => _configService.ProxyUsername; + + public string ProxyPassword => _configService.ProxyPassword; + + public string ProxyBypassFilter => _configService.ProxyBypassFilter; + + public bool ProxyBypassLocalAddresses => _configService.ProxyBypassLocalAddresses; + } +} diff --git a/src/NzbDrone.Core/Configuration/UIConfigService.cs b/src/NzbDrone.Core/Configuration/UIConfigService.cs new file mode 100644 index 0000000000..3a40e40cda --- /dev/null +++ b/src/NzbDrone.Core/Configuration/UIConfigService.cs @@ -0,0 +1,72 @@ +namespace NzbDrone.Core.Configuration +{ + public class UIConfigService : IUIConfigService + { + private readonly IConfigService _configService; + + public UIConfigService(IConfigService configService) + { + _configService = configService; + } + + public int FirstDayOfWeek + { + get => _configService.FirstDayOfWeek; + set => _configService.FirstDayOfWeek = value; + } + + public string CalendarWeekColumnHeader + { + get => _configService.CalendarWeekColumnHeader; + set => _configService.CalendarWeekColumnHeader = value; + } + + public MovieRuntimeFormatType MovieRuntimeFormat + { + get => _configService.MovieRuntimeFormat; + set => _configService.MovieRuntimeFormat = value; + } + + public string ShortDateFormat + { + get => _configService.ShortDateFormat; + set => _configService.ShortDateFormat = value; + } + + public string LongDateFormat + { + get => _configService.LongDateFormat; + set => _configService.LongDateFormat = value; + } + + public string TimeFormat + { + get => _configService.TimeFormat; + set => _configService.TimeFormat = value; + } + + public bool ShowRelativeDates + { + get => _configService.ShowRelativeDates; + set => _configService.ShowRelativeDates = value; + } + + public bool EnableColorImpairedMode + { + get => _configService.EnableColorImpairedMode; + set => _configService.EnableColorImpairedMode = value; + } + + public int MovieInfoLanguage + { + get => _configService.MovieInfoLanguage; + set => _configService.MovieInfoLanguage = value; + } + + public int UILanguage + { + get => _configService.UILanguage; + set => _configService.UILanguage = value; + } + } +}