mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Because it's 2016!
This commit is contained in:
parent
2e36538dcd
commit
aba613acd1
@ -27,7 +27,7 @@ public EnableAuthInNancy(IAuthenticationService authenticationService,
|
|||||||
_configFileProvider = configFileProvider;
|
_configFileProvider = configFileProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Order { get { return 10; } }
|
public int Order => 10;
|
||||||
|
|
||||||
public void Register(IPipelines pipelines)
|
public void Register(IPipelines pipelines)
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ public CacheHeaderPipeline(ICacheableSpecification cacheableSpecification)
|
|||||||
_cacheableSpecification = cacheableSpecification;
|
_cacheableSpecification = cacheableSpecification;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Order { get { return 0; } }
|
public int Order => 0;
|
||||||
|
|
||||||
public void Register(IPipelines pipelines)
|
public void Register(IPipelines pipelines)
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
|||||||
{
|
{
|
||||||
public class CorsPipeline : IRegisterNancyPipeline
|
public class CorsPipeline : IRegisterNancyPipeline
|
||||||
{
|
{
|
||||||
public int Order { get { return 0; } }
|
public int Order => 0;
|
||||||
|
|
||||||
public void Register(IPipelines pipelines)
|
public void Register(IPipelines pipelines)
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ public class GzipCompressionPipeline : IRegisterNancyPipeline
|
|||||||
{
|
{
|
||||||
private readonly Logger _logger;
|
private readonly Logger _logger;
|
||||||
|
|
||||||
public int Order { get { return 0; } }
|
public int Order => 0;
|
||||||
|
|
||||||
public GzipCompressionPipeline(Logger logger)
|
public GzipCompressionPipeline(Logger logger)
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ public IfModifiedPipeline(ICacheableSpecification cacheableSpecification)
|
|||||||
_cacheableSpecification = cacheableSpecification;
|
_cacheableSpecification = cacheableSpecification;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Order { get { return 0; } }
|
public int Order => 0;
|
||||||
|
|
||||||
public void Register(IPipelines pipelines)
|
public void Register(IPipelines pipelines)
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
|||||||
{
|
{
|
||||||
public class NzbDroneVersionPipeline : IRegisterNancyPipeline
|
public class NzbDroneVersionPipeline : IRegisterNancyPipeline
|
||||||
{
|
{
|
||||||
public int Order { get { return 0; } }
|
public int Order => 0;
|
||||||
|
|
||||||
public void Register(IPipelines pipelines)
|
public void Register(IPipelines pipelines)
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ public RequestLoggingPipeline(NzbDroneErrorPipeline errorPipeline)
|
|||||||
_errorPipeline = errorPipeline;
|
_errorPipeline = errorPipeline;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Order { get { return 100; } }
|
public int Order => 100;
|
||||||
|
|
||||||
public void Register(IPipelines pipelines)
|
public void Register(IPipelines pipelines)
|
||||||
{
|
{
|
||||||
|
@ -31,13 +31,6 @@ protected override string GetLogFilePath(string filename)
|
|||||||
return Path.Combine(_appFolderInfo.GetLogFolder(), filename);
|
return Path.Combine(_appFolderInfo.GetLogFolder(), filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string DownloadUrlRoot
|
protected override string DownloadUrlRoot => "logfile";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "logfile";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -38,12 +38,6 @@ protected override string GetLogFilePath(string filename)
|
|||||||
return Path.Combine(_appFolderInfo.GetUpdateLogFolder(), filename);
|
return Path.Combine(_appFolderInfo.GetUpdateLogFolder(), filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string DownloadUrlRoot
|
protected override string DownloadUrlRoot => "updatelogfile";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "updatelogfile";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -55,17 +55,8 @@ protected override TinyIoCContainer GetApplicationContainer()
|
|||||||
return _tinyIoCContainer;
|
return _tinyIoCContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override DiagnosticsConfiguration DiagnosticsConfiguration
|
protected override DiagnosticsConfiguration DiagnosticsConfiguration => new DiagnosticsConfiguration { Password = @"password" };
|
||||||
{
|
|
||||||
get { return new DiagnosticsConfiguration { Password = @"password" }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override byte[] FavIcon
|
protected override byte[] FavIcon => null;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -9,6 +9,6 @@ public class LanguageResource : RestResource
|
|||||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Include)]
|
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Include)]
|
||||||
public new int Id { get; set; }
|
public new int Id { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string NameLower { get { return Name.ToLowerInvariant(); } }
|
public string NameLower => Name.ToLowerInvariant();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,12 +8,6 @@ public abstract class RestResource
|
|||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string ResourceName
|
public virtual string ResourceName => GetType().Name.ToLowerInvariant().Replace("resource", "");
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return GetType().Name.ToLowerInvariant().Replace("resource", "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -31,10 +31,7 @@ public class TinyIoCNancyBootstrapper : NancyBootstrapperWithRequestContainerBas
|
|||||||
/// does not mean the assembly *will* be included, a true from another delegate will
|
/// does not mean the assembly *will* be included, a true from another delegate will
|
||||||
/// take precedence.
|
/// take precedence.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual IEnumerable<Func<Assembly, bool>> AutoRegisterIgnoredAssemblies
|
protected virtual IEnumerable<Func<Assembly, bool>> AutoRegisterIgnoredAssemblies => DefaultAutoRegisterIgnoredAssemblies;
|
||||||
{
|
|
||||||
get { return DefaultAutoRegisterIgnoredAssemblies; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Configures the container using AutoRegister followed by registration
|
/// Configures the container using AutoRegister followed by registration
|
||||||
|
@ -47,52 +47,16 @@ public void WaitForNoSpinner(int timeout = 30)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public IWebElement SeriesNavIcon
|
public IWebElement SeriesNavIcon => FindByClass("x-series-nav");
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return FindByClass("x-series-nav");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public IWebElement CalendarNavIcon
|
public IWebElement CalendarNavIcon => FindByClass("x-calendar-nav");
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return FindByClass("x-calendar-nav");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public IWebElement ActivityNavIcon
|
public IWebElement ActivityNavIcon => FindByClass("x-activity-nav");
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return FindByClass("x-activity-nav");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public IWebElement WantedNavIcon
|
public IWebElement WantedNavIcon => FindByClass("x-wanted-nav");
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return FindByClass("x-wanted-nav");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public IWebElement SettingNavIcon
|
public IWebElement SettingNavIcon => FindByClass("x-settings-nav");
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return FindByClass("x-settings-nav");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public IWebElement SystemNavIcon
|
public IWebElement SystemNavIcon => FindByClass("x-system-nav");
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return FindByClass("x-system-nav");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -28,7 +28,7 @@ public void Clear()
|
|||||||
_cache.Clear();
|
_cache.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICollection<ICached> Caches { get { return _cache.Values; } }
|
public ICollection<ICached> Caches => _cache.Values;
|
||||||
|
|
||||||
public ICached<T> GetCache<T>(Type host)
|
public ICached<T> GetCache<T>(Type host)
|
||||||
{
|
{
|
||||||
|
@ -67,13 +67,7 @@ public void Remove(string key)
|
|||||||
_store.TryRemove(key, out value);
|
_store.TryRemove(key, out value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Count
|
public int Count => _store.Count;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _store.Count;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public T Get(string key, Func<T> function, TimeSpan? lifeTime = null)
|
public T Get(string key, Func<T> function, TimeSpan? lifeTime = null)
|
||||||
{
|
{
|
||||||
|
@ -14,10 +14,7 @@ public interface IConsoleService
|
|||||||
|
|
||||||
public class ConsoleService : IConsoleService
|
public class ConsoleService : IConsoleService
|
||||||
{
|
{
|
||||||
public static bool IsConsoleAvailable
|
public static bool IsConsoleAvailable => Console.In != StreamReader.Null;
|
||||||
{
|
|
||||||
get { return Console.In != StreamReader.Null; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PrintHelp()
|
public void PrintHelp()
|
||||||
{
|
{
|
||||||
|
@ -14,15 +14,9 @@ public DriveInfoMount(DriveInfo driveInfo, DriveType driveType = DriveType.Unkno
|
|||||||
_driveType = driveType;
|
_driveType = driveType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long AvailableFreeSpace
|
public long AvailableFreeSpace => _driveInfo.AvailableFreeSpace;
|
||||||
{
|
|
||||||
get { return _driveInfo.AvailableFreeSpace; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string DriveFormat
|
public string DriveFormat => _driveInfo.DriveFormat;
|
||||||
{
|
|
||||||
get { return _driveInfo.DriveFormat; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public DriveType DriveType
|
public DriveType DriveType
|
||||||
{
|
{
|
||||||
@ -37,35 +31,17 @@ public DriveType DriveType
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsReady
|
public bool IsReady => _driveInfo.IsReady;
|
||||||
{
|
|
||||||
get { return _driveInfo.IsReady; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Name
|
public string Name => _driveInfo.Name;
|
||||||
{
|
|
||||||
get { return _driveInfo.Name; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string RootDirectory
|
public string RootDirectory => _driveInfo.RootDirectory.FullName;
|
||||||
{
|
|
||||||
get { return _driveInfo.RootDirectory.FullName; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public long TotalFreeSpace
|
public long TotalFreeSpace => _driveInfo.TotalFreeSpace;
|
||||||
{
|
|
||||||
get { return _driveInfo.TotalFreeSpace; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public long TotalSize
|
public long TotalSize => _driveInfo.TotalSize;
|
||||||
{
|
|
||||||
get { return _driveInfo.TotalSize; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string VolumeLabel
|
public string VolumeLabel => _driveInfo.VolumeLabel;
|
||||||
{
|
|
||||||
get { return _driveInfo.VolumeLabel; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string VolumeName
|
public string VolumeName
|
||||||
{
|
{
|
||||||
|
@ -77,28 +77,13 @@ private static string FixSlashes(string path, OsPathKind kind)
|
|||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OsPathKind Kind
|
public OsPathKind Kind => _kind;
|
||||||
{
|
|
||||||
get { return _kind; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsWindowsPath
|
public bool IsWindowsPath => _kind == OsPathKind.Windows;
|
||||||
{
|
|
||||||
get { return _kind == OsPathKind.Windows; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsUnixPath
|
public bool IsUnixPath => _kind == OsPathKind.Unix;
|
||||||
{
|
|
||||||
get { return _kind == OsPathKind.Unix; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsEmpty
|
public bool IsEmpty => _path.IsNullOrWhiteSpace();
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _path.IsNullOrWhiteSpace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsRooted
|
public bool IsRooted
|
||||||
{
|
{
|
||||||
@ -132,13 +117,7 @@ public OsPath Directory
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string FullPath
|
public string FullPath => _path;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _path;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string FileName
|
public string FileName
|
||||||
{
|
{
|
||||||
@ -162,13 +141,7 @@ public string FileName
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsValid
|
public bool IsValid => _path.IsPathValid();
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _path.IsPathValid();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private int GetFileNameIndex()
|
private int GetFileNameIndex()
|
||||||
{
|
{
|
||||||
|
@ -6,10 +6,7 @@ namespace NzbDrone.Common.EnvironmentInfo
|
|||||||
{
|
{
|
||||||
public static class BuildInfo
|
public static class BuildInfo
|
||||||
{
|
{
|
||||||
public static Version Version
|
public static Version Version => Assembly.GetExecutingAssembly().GetName().Version;
|
||||||
{
|
|
||||||
get { return Assembly.GetExecutingAssembly().GetName().Version; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public static DateTime BuildDateTime
|
public static DateTime BuildDateTime
|
||||||
{
|
{
|
||||||
|
@ -36,18 +36,9 @@ static RuntimeInfoBase()
|
|||||||
IsProduction = InternalIsProduction();
|
IsProduction = InternalIsProduction();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsUserInteractive
|
public static bool IsUserInteractive => Environment.UserInteractive;
|
||||||
{
|
|
||||||
get { return Environment.UserInteractive; }
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IRuntimeInfo.IsUserInteractive
|
bool IRuntimeInfo.IsUserInteractive => IsUserInteractive;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return IsUserInteractive;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsAdmin
|
public bool IsAdmin
|
||||||
{
|
{
|
||||||
|
@ -47,21 +47,9 @@ public StartupContext(params string[] args)
|
|||||||
public HashSet<string> Flags { get; private set; }
|
public HashSet<string> Flags { get; private set; }
|
||||||
public Dictionary<string, string> Args { get; private set; }
|
public Dictionary<string, string> Args { get; private set; }
|
||||||
|
|
||||||
public bool InstallService
|
public bool InstallService => Flags.Contains(INSTALL_SERVICE);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Flags.Contains(INSTALL_SERVICE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool UninstallService
|
public bool UninstallService => Flags.Contains(UNINSTALL_SERVICE);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Flags.Contains(UNINSTALL_SERVICE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string PreservedArguments
|
public string PreservedArguments
|
||||||
{
|
{
|
||||||
|
@ -15,19 +15,13 @@ public class ExceptronClient : IExceptronClient
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Version of Client
|
/// Version of Client
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ClientVersion
|
public string ClientVersion => Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||||
{
|
|
||||||
get { return Assembly.GetExecutingAssembly().GetName().Version.ToString(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Name of Client
|
/// Name of Client
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ClientName
|
public string ClientName => "Official .NET";
|
||||||
{
|
|
||||||
get { return "Official .NET"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Client Configuration
|
/// Client Configuration
|
||||||
|
@ -14,13 +14,7 @@ public class ExceptionResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Was the report successfully processed on the server
|
/// Was the report successfully processed on the server
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Successful
|
public bool Successful => !string.IsNullOrEmpty(RefId);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return !string.IsNullOrEmpty(RefId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Exception that caused the message to fail.
|
/// Exception that caused the message to fail.
|
||||||
|
@ -16,13 +16,7 @@ internal bool TryGetValue(TKey key, out TValue value)
|
|||||||
return _Dictionary.TryGetValue(key, out value);
|
return _Dictionary.TryGetValue(key, out value);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal TValue this[TKey key]
|
internal TValue this[TKey key] => _Dictionary[key];
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _Dictionary[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void Add(TKey key, TValue value)
|
internal void Add(TKey key, TValue value)
|
||||||
{
|
{
|
||||||
|
@ -328,9 +328,6 @@ protected override bool ReleaseHandle()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool IsInvalid
|
public override bool IsInvalid => !_initialized || !_available;
|
||||||
{
|
|
||||||
get { return !_initialized || !_available; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,13 +49,7 @@ public string Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public bool HasHttpError
|
public bool HasHttpError => (int)StatusCode >= 400;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return (int)StatusCode >= 400;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Dictionary<string, string> GetCookies()
|
public Dictionary<string, string> GetCookies()
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ public class HttpUri : IEquatable<HttpUri>
|
|||||||
private static readonly Regex RegexUri = new Regex(@"^(?:(?<scheme>[a-z]+):)?(?://(?<host>[-A-Z0-9.]+)(?::(?<port>[0-9]{1,5}))?)?(?<path>(?:(?:(?<=^)|/)[^/?#\r\n]+)+/?|/)?(?:\?(?<query>[^#\r\n]*))?(?:\#(?<fragment>.*))?$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
private static readonly Regex RegexUri = new Regex(@"^(?:(?<scheme>[a-z]+):)?(?://(?<host>[-A-Z0-9.]+)(?::(?<port>[0-9]{1,5}))?)?(?<path>(?:(?:(?<=^)|/)[^/?#\r\n]+)+/?|/)?(?:\?(?<query>[^#\r\n]*))?(?:\#(?<fragment>.*))?$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
private readonly string _uri;
|
private readonly string _uri;
|
||||||
public string FullUri { get { return _uri; } }
|
public string FullUri => _uri;
|
||||||
|
|
||||||
public HttpUri(string uri)
|
public HttpUri(string uri)
|
||||||
{
|
{
|
||||||
|
@ -45,19 +45,13 @@ public string[] BypassListAsArray
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Key
|
public string Key => string.Join("_",
|
||||||
{
|
Type,
|
||||||
get
|
Host,
|
||||||
{
|
Port,
|
||||||
return string.Join("_",
|
Username,
|
||||||
Type,
|
Password,
|
||||||
Host,
|
BypassFilter,
|
||||||
Port,
|
BypassLocalAddress);
|
||||||
Username,
|
|
||||||
Password,
|
|
||||||
BypassFilter,
|
|
||||||
BypassLocalAddress);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ protected sealed override bool TryDequeue(Task task)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Gets the maximum concurrency level supported by this scheduler.</summary>
|
/// <summary>Gets the maximum concurrency level supported by this scheduler.</summary>
|
||||||
public sealed override int MaximumConcurrencyLevel { get { return _maxDegreeOfParallelism; } }
|
public sealed override int MaximumConcurrencyLevel => _maxDegreeOfParallelism;
|
||||||
|
|
||||||
/// <summary>Gets an enumerable of the tasks currently scheduled on this scheduler.</summary>
|
/// <summary>Gets an enumerable of the tasks currently scheduled on this scheduler.</summary>
|
||||||
/// <returns>An enumerable of the tasks currently scheduled.</returns>
|
/// <returns>An enumerable of the tasks currently scheduled.</returns>
|
||||||
|
@ -669,13 +669,7 @@ public NamedParameterOverloads(IDictionary<string, object> data)
|
|||||||
|
|
||||||
private static readonly NamedParameterOverloads _Default = new NamedParameterOverloads();
|
private static readonly NamedParameterOverloads _Default = new NamedParameterOverloads();
|
||||||
|
|
||||||
public static NamedParameterOverloads Default
|
public static NamedParameterOverloads Default => _Default;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _Default;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum UnregisteredResolutionActions
|
public enum UnregisteredResolutionActions
|
||||||
@ -741,46 +735,22 @@ public NamedResolutionFailureActions NamedResolutionFailureAction
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the default options (attempt resolution of unregistered types, fail on named resolution if name not found)
|
/// Gets the default options (attempt resolution of unregistered types, fail on named resolution if name not found)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static ResolveOptions Default
|
public static ResolveOptions Default => _Default;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _Default;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Preconfigured option for attempting resolution of unregistered types and failing on named resolution if name not found
|
/// Preconfigured option for attempting resolution of unregistered types and failing on named resolution if name not found
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static ResolveOptions FailNameNotFoundOnly
|
public static ResolveOptions FailNameNotFoundOnly => _FailNameNotFoundOnly;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _FailNameNotFoundOnly;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Preconfigured option for failing on resolving unregistered types and on named resolution if name not found
|
/// Preconfigured option for failing on resolving unregistered types and on named resolution if name not found
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static ResolveOptions FailUnregisteredAndNameNotFound
|
public static ResolveOptions FailUnregisteredAndNameNotFound => _FailUnregisteredAndNameNotFound;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _FailUnregisteredAndNameNotFound;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Preconfigured option for failing on resolving unregistered types, but attempting unnamed resolution if name not found
|
/// Preconfigured option for failing on resolving unregistered types, but attempting unnamed resolution if name not found
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static ResolveOptions FailUnregisteredOnly
|
public static ResolveOptions FailUnregisteredOnly => _FailUnregisteredOnly;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _FailUnregisteredOnly;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -2394,7 +2364,7 @@ private abstract class ObjectFactoryBase
|
|||||||
/// Generally set to true for delegate style factories as CanResolve cannot delve
|
/// Generally set to true for delegate style factories as CanResolve cannot delve
|
||||||
/// into the delegates they contain.
|
/// into the delegates they contain.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual bool AssumeConstruction { get { return false; } }
|
public virtual bool AssumeConstruction => false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The type the factory instantiates
|
/// The type the factory instantiates
|
||||||
@ -2471,7 +2441,7 @@ private class MultiInstanceFactory : ObjectFactoryBase
|
|||||||
{
|
{
|
||||||
private readonly Type registerType;
|
private readonly Type registerType;
|
||||||
private readonly Type registerImplementation;
|
private readonly Type registerImplementation;
|
||||||
public override Type CreatesType { get { return this.registerImplementation; } }
|
public override Type CreatesType => this.registerImplementation;
|
||||||
|
|
||||||
public MultiInstanceFactory(Type registerType, Type registerImplementation)
|
public MultiInstanceFactory(Type registerType, Type registerImplementation)
|
||||||
{
|
{
|
||||||
@ -2501,26 +2471,14 @@ public override object GetObject(Type requestedType, TinyIoCContainer container,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ObjectFactoryBase SingletonVariant
|
public override ObjectFactoryBase SingletonVariant => new SingletonFactory(this.registerType, this.registerImplementation);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new SingletonFactory(this.registerType, this.registerImplementation);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override ObjectFactoryBase GetCustomObjectLifetimeVariant(ITinyIoCObjectLifetimeProvider lifetimeProvider, string errorString)
|
public override ObjectFactoryBase GetCustomObjectLifetimeVariant(ITinyIoCObjectLifetimeProvider lifetimeProvider, string errorString)
|
||||||
{
|
{
|
||||||
return new CustomObjectLifetimeFactory(this.registerType, this.registerImplementation, lifetimeProvider, errorString);
|
return new CustomObjectLifetimeFactory(this.registerType, this.registerImplementation, lifetimeProvider, errorString);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ObjectFactoryBase MultiInstanceVariant
|
public override ObjectFactoryBase MultiInstanceVariant => this;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -2532,9 +2490,9 @@ private class DelegateFactory : ObjectFactoryBase
|
|||||||
|
|
||||||
private Func<TinyIoCContainer, NamedParameterOverloads, object> _factory;
|
private Func<TinyIoCContainer, NamedParameterOverloads, object> _factory;
|
||||||
|
|
||||||
public override bool AssumeConstruction { get { return true; } }
|
public override bool AssumeConstruction => true;
|
||||||
|
|
||||||
public override Type CreatesType { get { return this.registerType; } }
|
public override Type CreatesType => this.registerType;
|
||||||
|
|
||||||
public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options)
|
public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options)
|
||||||
{
|
{
|
||||||
@ -2558,21 +2516,9 @@ public DelegateFactory(Type registerType, Func<TinyIoCContainer, NamedParameterO
|
|||||||
this.registerType = registerType;
|
this.registerType = registerType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ObjectFactoryBase WeakReferenceVariant
|
public override ObjectFactoryBase WeakReferenceVariant => new WeakDelegateFactory(this.registerType, _factory);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new WeakDelegateFactory(this.registerType, _factory);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override ObjectFactoryBase StrongReferenceVariant
|
public override ObjectFactoryBase StrongReferenceVariant => this;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SetConstructor(ConstructorInfo constructor)
|
public override void SetConstructor(ConstructorInfo constructor)
|
||||||
{
|
{
|
||||||
@ -2590,9 +2536,9 @@ private class WeakDelegateFactory : ObjectFactoryBase
|
|||||||
|
|
||||||
private WeakReference _factory;
|
private WeakReference _factory;
|
||||||
|
|
||||||
public override bool AssumeConstruction { get { return true; } }
|
public override bool AssumeConstruction => true;
|
||||||
|
|
||||||
public override Type CreatesType { get { return this.registerType; } }
|
public override Type CreatesType => this.registerType;
|
||||||
|
|
||||||
public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options)
|
public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options)
|
||||||
{
|
{
|
||||||
@ -2634,13 +2580,7 @@ public override ObjectFactoryBase StrongReferenceVariant
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ObjectFactoryBase WeakReferenceVariant
|
public override ObjectFactoryBase WeakReferenceVariant => this;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SetConstructor(ConstructorInfo constructor)
|
public override void SetConstructor(ConstructorInfo constructor)
|
||||||
{
|
{
|
||||||
@ -2657,7 +2597,7 @@ private class InstanceFactory : ObjectFactoryBase, IDisposable
|
|||||||
private readonly Type registerImplementation;
|
private readonly Type registerImplementation;
|
||||||
private object _instance;
|
private object _instance;
|
||||||
|
|
||||||
public override bool AssumeConstruction { get { return true; } }
|
public override bool AssumeConstruction => true;
|
||||||
|
|
||||||
public InstanceFactory(Type registerType, Type registerImplementation, object instance)
|
public InstanceFactory(Type registerType, Type registerImplementation, object instance)
|
||||||
{
|
{
|
||||||
@ -2669,36 +2609,18 @@ public InstanceFactory(Type registerType, Type registerImplementation, object in
|
|||||||
_instance = instance;
|
_instance = instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Type CreatesType
|
public override Type CreatesType => this.registerImplementation;
|
||||||
{
|
|
||||||
get { return this.registerImplementation; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options)
|
public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options)
|
||||||
{
|
{
|
||||||
return _instance;
|
return _instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ObjectFactoryBase MultiInstanceVariant
|
public override ObjectFactoryBase MultiInstanceVariant => new MultiInstanceFactory(this.registerType, this.registerImplementation);
|
||||||
{
|
|
||||||
get { return new MultiInstanceFactory(this.registerType, this.registerImplementation); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override ObjectFactoryBase WeakReferenceVariant
|
public override ObjectFactoryBase WeakReferenceVariant => new WeakInstanceFactory(this.registerType, this.registerImplementation, this._instance);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new WeakInstanceFactory(this.registerType, this.registerImplementation, this._instance);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override ObjectFactoryBase StrongReferenceVariant
|
public override ObjectFactoryBase StrongReferenceVariant => this;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SetConstructor(ConstructorInfo constructor)
|
public override void SetConstructor(ConstructorInfo constructor)
|
||||||
{
|
{
|
||||||
@ -2735,10 +2657,7 @@ public WeakInstanceFactory(Type registerType, Type registerImplementation, objec
|
|||||||
_instance = new WeakReference(instance);
|
_instance = new WeakReference(instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Type CreatesType
|
public override Type CreatesType => this.registerImplementation;
|
||||||
{
|
|
||||||
get { return this.registerImplementation; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options)
|
public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options)
|
||||||
{
|
{
|
||||||
@ -2750,21 +2669,9 @@ public override object GetObject(Type requestedType, TinyIoCContainer container,
|
|||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ObjectFactoryBase MultiInstanceVariant
|
public override ObjectFactoryBase MultiInstanceVariant => new MultiInstanceFactory(this.registerType, this.registerImplementation);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new MultiInstanceFactory(this.registerType, this.registerImplementation);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override ObjectFactoryBase WeakReferenceVariant
|
public override ObjectFactoryBase WeakReferenceVariant => this;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override ObjectFactoryBase StrongReferenceVariant
|
public override ObjectFactoryBase StrongReferenceVariant
|
||||||
{
|
{
|
||||||
@ -2819,10 +2726,7 @@ public SingletonFactory(Type registerType, Type registerImplementation)
|
|||||||
this.registerImplementation = registerImplementation;
|
this.registerImplementation = registerImplementation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Type CreatesType
|
public override Type CreatesType => this.registerImplementation;
|
||||||
{
|
|
||||||
get { return this.registerImplementation; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options)
|
public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options)
|
||||||
{
|
{
|
||||||
@ -2836,26 +2740,14 @@ public override object GetObject(Type requestedType, TinyIoCContainer container,
|
|||||||
return _Current;
|
return _Current;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ObjectFactoryBase SingletonVariant
|
public override ObjectFactoryBase SingletonVariant => this;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override ObjectFactoryBase GetCustomObjectLifetimeVariant(ITinyIoCObjectLifetimeProvider lifetimeProvider, string errorString)
|
public override ObjectFactoryBase GetCustomObjectLifetimeVariant(ITinyIoCObjectLifetimeProvider lifetimeProvider, string errorString)
|
||||||
{
|
{
|
||||||
return new CustomObjectLifetimeFactory(this.registerType, this.registerImplementation, lifetimeProvider, errorString);
|
return new CustomObjectLifetimeFactory(this.registerType, this.registerImplementation, lifetimeProvider, errorString);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ObjectFactoryBase MultiInstanceVariant
|
public override ObjectFactoryBase MultiInstanceVariant => new MultiInstanceFactory(this.registerType, this.registerImplementation);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new MultiInstanceFactory(this.registerType, this.registerImplementation);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override ObjectFactoryBase GetFactoryForChildContainer(Type type, TinyIoCContainer parent, TinyIoCContainer child)
|
public override ObjectFactoryBase GetFactoryForChildContainer(Type type, TinyIoCContainer parent, TinyIoCContainer child)
|
||||||
{
|
{
|
||||||
@ -2908,10 +2800,7 @@ public CustomObjectLifetimeFactory(Type registerType, Type registerImplementatio
|
|||||||
_LifetimeProvider = lifetimeProvider;
|
_LifetimeProvider = lifetimeProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Type CreatesType
|
public override Type CreatesType => this.registerImplementation;
|
||||||
{
|
|
||||||
get { return this.registerImplementation; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options)
|
public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options)
|
||||||
{
|
{
|
||||||
@ -2980,13 +2869,8 @@ static TinyIoCContainer()
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Lazy created Singleton instance of the container for simple scenarios
|
/// Lazy created Singleton instance of the container for simple scenarios
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static TinyIoCContainer Current
|
public static TinyIoCContainer Current => _Current;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _Current;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Type Registrations
|
#region Type Registrations
|
||||||
|
@ -23,21 +23,9 @@ public abstract class DbTest<TSubject, TModel> : DbTest
|
|||||||
|
|
||||||
protected BasicRepository<TModel> Storage { get; private set; }
|
protected BasicRepository<TModel> Storage { get; private set; }
|
||||||
|
|
||||||
protected IList<TModel> AllStoredModels
|
protected IList<TModel> AllStoredModels => Storage.All().ToList();
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Storage.All().ToList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected TModel StoredModel
|
protected TModel StoredModel => Storage.All().Single();
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Storage.All().Single();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[SetUp]
|
[SetUp]
|
||||||
public void CoreTestSetup()
|
public void CoreTestSetup()
|
||||||
@ -66,13 +54,7 @@ public abstract class DbTest : CoreTest
|
|||||||
{
|
{
|
||||||
private ITestDatabase _db;
|
private ITestDatabase _db;
|
||||||
|
|
||||||
protected virtual MigrationType MigrationType
|
protected virtual MigrationType MigrationType => MigrationType.Main;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return MigrationType.Main;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected ITestDatabase Db
|
protected ITestDatabase Db
|
||||||
{
|
{
|
||||||
|
@ -45,9 +45,6 @@ public override void SetupDb()
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Obsolete("Don't use Mocker/Repositories in MigrationTests, query the DB.", true)]
|
[Obsolete("Don't use Mocker/Repositories in MigrationTests, query the DB.", true)]
|
||||||
public new AutoMoqer Mocker
|
public new AutoMoqer Mocker => base.Mocker;
|
||||||
{
|
|
||||||
get { return base.Mocker; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -9,18 +9,12 @@ namespace NzbDrone.Core.Test.IndexerTests
|
|||||||
{
|
{
|
||||||
public class TestIndexer : HttpIndexerBase<TestIndexerSettings>
|
public class TestIndexer : HttpIndexerBase<TestIndexerSettings>
|
||||||
{
|
{
|
||||||
public override string Name
|
public override string Name => "Test Indexer";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "Test Indexer";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override DownloadProtocol Protocol { get { return DownloadProtocol.Usenet; } }
|
public override DownloadProtocol Protocol => DownloadProtocol.Usenet;
|
||||||
|
|
||||||
public int _supportedPageSize;
|
public int _supportedPageSize;
|
||||||
public override int PageSize { get { return _supportedPageSize; } }
|
public override int PageSize => _supportedPageSize;
|
||||||
|
|
||||||
public TestIndexer(IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, IParsingService parsingService, Logger logger)
|
public TestIndexer(IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, IParsingService parsingService, Logger logger)
|
||||||
: base(httpClient, indexerStatusService, configService, parsingService, logger)
|
: base(httpClient, indexerStatusService, configService, parsingService, logger)
|
||||||
|
@ -20,14 +20,8 @@ public class DatabaseTargetFixture : DbTest<DatabaseTarget, Log>
|
|||||||
private static string _uniqueMessage;
|
private static string _uniqueMessage;
|
||||||
Logger _logger;
|
Logger _logger;
|
||||||
|
|
||||||
protected override MigrationType MigrationType
|
protected override MigrationType MigrationType => MigrationType.Log;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return MigrationType.Log;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
[SetUp]
|
[SetUp]
|
||||||
public void Setup()
|
public void Setup()
|
||||||
{
|
{
|
||||||
|
@ -17,12 +17,6 @@ public AnalyticsService(IConfigFileProvider configFileProvider)
|
|||||||
_configFileProvider = configFileProvider;
|
_configFileProvider = configFileProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsEnabled
|
public bool IsEnabled => _configFileProvider.AnalyticsEnabled && RuntimeInfoBase.IsProduction;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _configFileProvider.AnalyticsEnabled && RuntimeInfoBase.IsProduction;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,21 +6,9 @@ public class BackupCommand : Command
|
|||||||
{
|
{
|
||||||
public BackupType Type { get; set; }
|
public BackupType Type { get; set; }
|
||||||
|
|
||||||
public override bool SendUpdatesToClient
|
public override bool SendUpdatesToClient => true;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool UpdateScheduledTask
|
public override bool UpdateScheduledTask => Type == BackupType.Scheduled;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Type == BackupType.Scheduled;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum BackupType
|
public enum BackupType
|
||||||
|
@ -4,12 +4,6 @@ namespace NzbDrone.Core.Blacklisting
|
|||||||
{
|
{
|
||||||
public class ClearBlacklistCommand : Command
|
public class ClearBlacklistCommand : Command
|
||||||
{
|
{
|
||||||
public override bool SendUpdatesToClient
|
public override bool SendUpdatesToClient => true;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -133,33 +133,15 @@ public string BindAddress
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Port
|
public int Port => GetValueInt("Port", 8989);
|
||||||
{
|
|
||||||
get { return GetValueInt("Port", 8989); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public int SslPort
|
public int SslPort => GetValueInt("SslPort", 9898);
|
||||||
{
|
|
||||||
get { return GetValueInt("SslPort", 9898); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool EnableSsl
|
public bool EnableSsl => GetValueBoolean("EnableSsl", false);
|
||||||
{
|
|
||||||
get { return GetValueBoolean("EnableSsl", false); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool LaunchBrowser
|
public bool LaunchBrowser => GetValueBoolean("LaunchBrowser", true);
|
||||||
{
|
|
||||||
get { return GetValueBoolean("LaunchBrowser", true); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ApiKey
|
public string ApiKey => GetValue("ApiKey", GenerateApiKey());
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return GetValue("ApiKey", GenerateApiKey());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public AuthenticationType AuthenticationMethod
|
public AuthenticationType AuthenticationMethod
|
||||||
{
|
{
|
||||||
@ -177,28 +159,13 @@ public AuthenticationType AuthenticationMethod
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool AnalyticsEnabled
|
public bool AnalyticsEnabled => GetValueBoolean("AnalyticsEnabled", true, persist: false);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return GetValueBoolean("AnalyticsEnabled", true, persist: false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Branch
|
public string Branch => GetValue("Branch", "master").ToLowerInvariant();
|
||||||
{
|
|
||||||
get { return GetValue("Branch", "master").ToLowerInvariant(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string LogLevel
|
public string LogLevel => GetValue("LogLevel", "Info");
|
||||||
{
|
|
||||||
get { return GetValue("LogLevel", "Info"); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string SslCertHash
|
public string SslCertHash => GetValue("SslCertHash", "");
|
||||||
{
|
|
||||||
get { return GetValue("SslCertHash", ""); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string UrlBase
|
public string UrlBase
|
||||||
{
|
{
|
||||||
@ -215,28 +182,13 @@ public string UrlBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string UiFolder
|
public string UiFolder => GetValue("UiFolder", "UI", false);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return GetValue("UiFolder", "UI", false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool UpdateAutomatically
|
public bool UpdateAutomatically => GetValueBoolean("UpdateAutomatically", false, false);
|
||||||
{
|
|
||||||
get { return GetValueBoolean("UpdateAutomatically", false, false); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public UpdateMechanism UpdateMechanism
|
public UpdateMechanism UpdateMechanism => GetValueEnum("UpdateMechanism", UpdateMechanism.BuiltIn, false);
|
||||||
{
|
|
||||||
get { return GetValueEnum("UpdateMechanism", UpdateMechanism.BuiltIn, false); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string UpdateScriptPath
|
public string UpdateScriptPath => GetValue("UpdateScriptPath", "", false );
|
||||||
{
|
|
||||||
get { return GetValue("UpdateScriptPath", "", false ); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetValueInt(string key, int defaultValue)
|
public int GetValueInt(string key, int defaultValue)
|
||||||
{
|
{
|
||||||
|
@ -300,65 +300,29 @@ public bool CleanupMetadataImages
|
|||||||
set { SetValue("CleanupMetadataImages", value); }
|
set { SetValue("CleanupMetadataImages", value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string RijndaelPassphrase
|
public string RijndaelPassphrase => GetValue("RijndaelPassphrase", Guid.NewGuid().ToString(), true);
|
||||||
{
|
|
||||||
get { return GetValue("RijndaelPassphrase", Guid.NewGuid().ToString(), true); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string HmacPassphrase
|
public string HmacPassphrase => GetValue("HmacPassphrase", Guid.NewGuid().ToString(), true);
|
||||||
{
|
|
||||||
get { return GetValue("HmacPassphrase", Guid.NewGuid().ToString(), true); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string RijndaelSalt
|
public string RijndaelSalt => GetValue("RijndaelSalt", Guid.NewGuid().ToString(), true);
|
||||||
{
|
|
||||||
get { return GetValue("RijndaelSalt", Guid.NewGuid().ToString(), true); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string HmacSalt
|
public string HmacSalt => GetValue("HmacSalt", Guid.NewGuid().ToString(), true);
|
||||||
{
|
|
||||||
get { return GetValue("HmacSalt", Guid.NewGuid().ToString(), true); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool ProxyEnabled
|
public bool ProxyEnabled => GetValueBoolean("ProxyEnabled", false);
|
||||||
{
|
|
||||||
get { return GetValueBoolean("ProxyEnabled", false); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public ProxyType ProxyType
|
public ProxyType ProxyType => GetValueEnum<ProxyType>("ProxyType", ProxyType.Http);
|
||||||
{
|
|
||||||
get { return GetValueEnum<ProxyType>("ProxyType", ProxyType.Http); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ProxyHostname
|
public string ProxyHostname => GetValue("ProxyHostname", string.Empty);
|
||||||
{
|
|
||||||
get { return GetValue("ProxyHostname", string.Empty); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public int ProxyPort
|
public int ProxyPort => GetValueInt("ProxyPort", 8080);
|
||||||
{
|
|
||||||
get { return GetValueInt("ProxyPort", 8080); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ProxyUsername
|
public string ProxyUsername => GetValue("ProxyUsername", string.Empty);
|
||||||
{
|
|
||||||
get { return GetValue("ProxyUsername", string.Empty); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ProxyPassword
|
public string ProxyPassword => GetValue("ProxyPassword", string.Empty);
|
||||||
{
|
|
||||||
get { return GetValue("ProxyPassword", string.Empty); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ProxyBypassFilter
|
public string ProxyBypassFilter => GetValue("ProxyBypassFilter", string.Empty);
|
||||||
{
|
|
||||||
get { return GetValue("ProxyBypassFilter", string.Empty); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool ProxyBypassLocalAddresses
|
public bool ProxyBypassLocalAddresses => GetValueBoolean("ProxyBypassLocalAddresses", true);
|
||||||
{
|
|
||||||
get { return GetValueBoolean("ProxyBypassLocalAddresses", true); }
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetValue(string key)
|
private string GetValue(string key)
|
||||||
{
|
{
|
||||||
|
@ -4,12 +4,6 @@ namespace NzbDrone.Core.Configuration
|
|||||||
{
|
{
|
||||||
public class ResetApiKeyCommand : Command
|
public class ResetApiKeyCommand : Command
|
||||||
{
|
{
|
||||||
public override bool SendUpdatesToClient
|
public override bool SendUpdatesToClient => true;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,10 +40,7 @@ namespace NzbDrone.Core.Datastore
|
|||||||
private readonly IDatabase _database;
|
private readonly IDatabase _database;
|
||||||
private readonly IEventAggregator _eventAggregator;
|
private readonly IEventAggregator _eventAggregator;
|
||||||
|
|
||||||
protected IDataMapper DataMapper
|
protected IDataMapper DataMapper => _database.GetDataMapper();
|
||||||
{
|
|
||||||
get { return _database.GetDataMapper(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public BasicRepository(IDatabase database, IEventAggregator eventAggregator)
|
public BasicRepository(IDatabase database, IEventAggregator eventAggregator)
|
||||||
{
|
{
|
||||||
@ -51,10 +48,7 @@ public BasicRepository(IDatabase database, IEventAggregator eventAggregator)
|
|||||||
_eventAggregator = eventAggregator;
|
_eventAggregator = eventAggregator;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected QueryBuilder<TModel> Query
|
protected QueryBuilder<TModel> Query => DataMapper.Query<TModel>();
|
||||||
{
|
|
||||||
get { return DataMapper.Query<TModel>(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void Delete(Expression<Func<TModel, bool>> filter)
|
protected void Delete(Expression<Func<TModel, bool>> filter)
|
||||||
{
|
{
|
||||||
@ -289,9 +283,6 @@ private void PublishModelEvent(TModel model, ModelAction action)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual bool PublishModelEvents
|
protected virtual bool PublishModelEvents => false;
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,12 +46,6 @@ public object ToDB(object clrValue)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Type DbType
|
public Type DbType => typeof(int);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return typeof(int);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -60,12 +60,6 @@ public object ToDB(object clrValue)
|
|||||||
return JsonConvert.SerializeObject(clrValue, SerializerSetting);
|
return JsonConvert.SerializeObject(clrValue, SerializerSetting);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Type DbType
|
public Type DbType => typeof(string);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return typeof(string);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,13 +6,7 @@ namespace NzbDrone.Core.Datastore.Converters
|
|||||||
{
|
{
|
||||||
public class EnumIntConverter : IConverter
|
public class EnumIntConverter : IConverter
|
||||||
{
|
{
|
||||||
public Type DbType
|
public Type DbType => typeof(int);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return typeof(int);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public object FromDB(ConverterContext context)
|
public object FromDB(ConverterContext context)
|
||||||
{
|
{
|
||||||
|
@ -30,9 +30,6 @@ public object ToDB(object clrValue)
|
|||||||
return value.ToString();
|
return value.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Type DbType
|
public Type DbType => typeof(string);
|
||||||
{
|
|
||||||
get { return typeof(string); }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,9 +31,6 @@ public object ToDB(object clrValue)
|
|||||||
return value.FullPath;
|
return value.FullPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Type DbType
|
public Type DbType => typeof(string);
|
||||||
{
|
|
||||||
get { return typeof(string); }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,13 +38,7 @@ public object ToDB(object clrValue)
|
|||||||
return (int)quality;
|
return (int)quality;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Type DbType
|
public Type DbType => typeof(int);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return typeof(int);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CanConvert(Type objectType)
|
public override bool CanConvert(Type objectType)
|
||||||
{
|
{
|
||||||
|
@ -27,12 +27,6 @@ public object ToDB(object clrValue)
|
|||||||
return dateTime.ToUniversalTime();
|
return dateTime.ToUniversalTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Type DbType
|
public Type DbType => typeof(DateTime);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return typeof(DateTime);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -25,10 +25,7 @@ public IDataMapper GetDataMapper()
|
|||||||
return _database.GetDataMapper();
|
return _database.GetDataMapper();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Version Version
|
public Version Version => _database.Version;
|
||||||
{
|
|
||||||
get { return _database.Version; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Vacuum()
|
public void Vacuum()
|
||||||
{
|
{
|
||||||
|
@ -25,10 +25,7 @@ public IDataMapper GetDataMapper()
|
|||||||
return _database.GetDataMapper();
|
return _database.GetDataMapper();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Version Version
|
public Version Version => _database.Version;
|
||||||
{
|
|
||||||
get { return _database.Version; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Vacuum()
|
public void Vacuum()
|
||||||
{
|
{
|
||||||
|
@ -18,13 +18,7 @@ public NzbDroneSqliteProcessor(IDbConnection connection, IMigrationGenerator gen
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool SupportsTransactions
|
public override bool SupportsTransactions => true;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Process(AlterColumnExpression expression)
|
public override void Process(AlterColumnExpression expression)
|
||||||
{
|
{
|
||||||
|
@ -16,15 +16,9 @@ public class SqliteSyntaxReader
|
|||||||
public TokenType Type { get; private set; }
|
public TokenType Type { get; private set; }
|
||||||
public string Value { get; private set; }
|
public string Value { get; private set; }
|
||||||
|
|
||||||
public string ValueToUpper
|
public string ValueToUpper => Value.ToUpperInvariant();
|
||||||
{
|
|
||||||
get { return Value.ToUpperInvariant(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsEndOfFile
|
public bool IsEndOfFile => Index >= Buffer.Length;
|
||||||
{
|
|
||||||
get { return Index >= Buffer.Length; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum TokenType
|
public enum TokenType
|
||||||
{
|
{
|
||||||
|
@ -9,13 +9,7 @@ public class DownloadDecision
|
|||||||
public RemoteEpisode RemoteEpisode { get; private set; }
|
public RemoteEpisode RemoteEpisode { get; private set; }
|
||||||
public IEnumerable<Rejection> Rejections { get; private set; }
|
public IEnumerable<Rejection> Rejections { get; private set; }
|
||||||
|
|
||||||
public bool Approved
|
public bool Approved => !Rejections.Any();
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return !Rejections.Any();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool TemporarilyRejected
|
public bool TemporarilyRejected
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@ public AcceptableSizeSpecification(IQualityDefinitionService qualityDefinitionSe
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -18,7 +18,7 @@ public AnimeVersionUpgradeSpecification(QualityUpgradableSpecification qualityUp
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@ public BlacklistSpecification(IBlacklistService blacklistService, Logger logger)
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ public CutoffSpecification(QualityUpgradableSpecification qualityUpgradableSpeci
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -19,7 +19,7 @@ public FullSeasonSpecification(Logger logger, IEpisodeService episodeService)
|
|||||||
_episodeService = episodeService;
|
_episodeService = episodeService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ public LanguageSpecification(Logger logger)
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ public MinimumAgeSpecification(IConfigService configService, Logger logger)
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Temporary; } }
|
public RejectionType Type => RejectionType.Temporary;
|
||||||
|
|
||||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ public class NotSampleSpecification : IDecisionEngineSpecification
|
|||||||
{
|
{
|
||||||
private readonly Logger _logger;
|
private readonly Logger _logger;
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public NotSampleSpecification(Logger logger)
|
public NotSampleSpecification(Logger logger)
|
||||||
{
|
{
|
||||||
|
@ -18,7 +18,7 @@ public ProtocolSpecification(IDelayProfileService delayProfileService,
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ public QualityAllowedByProfileSpecification(Logger logger)
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ public QueueSpecification(IQueueService queueService,
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -19,7 +19,7 @@ public RawDiskSpecification(Logger logger)
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,7 @@ public ReleaseRestrictionsSpecification(IRestrictionService restrictionService,
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ public RetentionSpecification(IConfigService configService, Logger logger)
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,7 @@ public DelaySpecification(IPendingReleaseService pendingReleaseService,
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Temporary; } }
|
public RejectionType Type => RejectionType.Temporary;
|
||||||
|
|
||||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,7 @@ public HistorySpecification(IHistoryService historyService,
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ public MonitoredEpisodeSpecification(Logger logger)
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,7 @@ public ProperSpecification(QualityUpgradableSpecification qualityUpgradableSpeci
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ public SameEpisodesGrabSpecification(SameEpisodesSpecification sameEpisodesSpeci
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ public DailyEpisodeMatchSpecification(Logger logger, IEpisodeService episodeServ
|
|||||||
_episodeService = episodeService;
|
_episodeService = episodeService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ public EpisodeRequestedSpecification(Logger logger)
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ public SeasonMatchSpecification(Logger logger)
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ public SeriesSpecification(Logger logger)
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ public SingleEpisodeSearchMatchSpecification(Logger logger)
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -13,13 +13,7 @@ public TorrentSeedingSpecification(Logger logger)
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return RejectionType.Permanent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
||||||
|
@ -16,7 +16,7 @@ public UpgradeDiskSpecification(QualityUpgradableSpecification qualityUpgradable
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
public RejectionType Type => RejectionType.Permanent;
|
||||||
|
|
||||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
|
@ -24,13 +24,7 @@ public class TorrentBlackhole : TorrentClientBase<TorrentBlackholeSettings>
|
|||||||
|
|
||||||
public TimeSpan ScanGracePeriod { get; set; }
|
public TimeSpan ScanGracePeriod { get; set; }
|
||||||
|
|
||||||
public override bool PreferTorrentFile
|
public override bool PreferTorrentFile => true;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public TorrentBlackhole(IScanWatchFolder scanWatchFolder,
|
public TorrentBlackhole(IScanWatchFolder scanWatchFolder,
|
||||||
ITorrentFileInfoReader torrentFileInfoReader,
|
ITorrentFileInfoReader torrentFileInfoReader,
|
||||||
@ -88,22 +82,9 @@ protected override string AddFromTorrentFile(RemoteEpisode remoteEpisode, string
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Name
|
public override string Name => "Torrent Blackhole";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "Torrent Blackhole";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override ProviderMessage Message
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new ProviderMessage("Magnet links are not supported.", ProviderMessageType.Warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
public override ProviderMessage Message => new ProviderMessage("Magnet links are not supported.", ProviderMessageType.Warning);
|
||||||
|
|
||||||
|
|
||||||
public override IEnumerable<DownloadClientItem> GetItems()
|
public override IEnumerable<DownloadClientItem> GetItems()
|
||||||
|
@ -52,13 +52,7 @@ protected override string AddFromNzbFile(RemoteEpisode remoteEpisode, string fil
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Name
|
public override string Name => "Usenet Blackhole";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "Usenet Blackhole";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IEnumerable<DownloadClientItem> GetItems()
|
public override IEnumerable<DownloadClientItem> GetItems()
|
||||||
{
|
{
|
||||||
|
@ -75,13 +75,7 @@ protected override string AddFromTorrentFile(RemoteEpisode remoteEpisode, string
|
|||||||
return actualHash.ToUpper();
|
return actualHash.ToUpper();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Name
|
public override string Name => "Deluge";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "Deluge";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IEnumerable<DownloadClientItem> GetItems()
|
public override IEnumerable<DownloadClientItem> GetItems()
|
||||||
{
|
{
|
||||||
|
@ -31,10 +31,7 @@ public Hadouken(IHadoukenProxy proxy,
|
|||||||
_proxy = proxy;
|
_proxy = proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Name
|
public override string Name => "Hadouken";
|
||||||
{
|
|
||||||
get { return "Hadouken"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IEnumerable<DownloadClientItem> GetItems()
|
public override IEnumerable<DownloadClientItem> GetItems()
|
||||||
{
|
{
|
||||||
|
@ -43,13 +43,7 @@ protected override string AddFromNzbFile(RemoteEpisode remoteEpisode, string fil
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Name
|
public override string Name => "NZBVortex";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "NZBVortex";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IEnumerable<DownloadClientItem> GetItems()
|
public override IEnumerable<DownloadClientItem> GetItems()
|
||||||
{
|
{
|
||||||
|
@ -7,13 +7,7 @@ public class NzbVortexJsonError
|
|||||||
public string Status { get; set; }
|
public string Status { get; set; }
|
||||||
public string Error { get; set; }
|
public string Error { get; set; }
|
||||||
|
|
||||||
public bool Failed
|
public bool Failed => !string.IsNullOrWhiteSpace(Status) &&
|
||||||
{
|
Status.Equals("false", StringComparison.InvariantCultureIgnoreCase);
|
||||||
get
|
|
||||||
{
|
|
||||||
return !string.IsNullOrWhiteSpace(Status) &&
|
|
||||||
Status.Equals("false", StringComparison.InvariantCultureIgnoreCase);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,13 +194,7 @@ private IEnumerable<DownloadClientItem> GetHistory()
|
|||||||
return historyItems;
|
return historyItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Name
|
public override string Name => "NZBGet";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "NZBGet";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IEnumerable<DownloadClientItem> GetItems()
|
public override IEnumerable<DownloadClientItem> GetItems()
|
||||||
{
|
{
|
||||||
|
@ -28,21 +28,9 @@ public Pneumatic(IHttpClient httpClient,
|
|||||||
_httpClient = httpClient;
|
_httpClient = httpClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Name
|
public override string Name => "Pneumatic";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "Pneumatic";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override DownloadProtocol Protocol
|
public override DownloadProtocol Protocol => DownloadProtocol.Usenet;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return DownloadProtocol.Usenet;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Download(RemoteEpisode remoteEpisode)
|
public override string Download(RemoteEpisode remoteEpisode)
|
||||||
{
|
{
|
||||||
@ -70,13 +58,7 @@ public override string Download(RemoteEpisode remoteEpisode)
|
|||||||
return GetDownloadClientId(strmFile);
|
return GetDownloadClientId(strmFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsConfigured
|
public bool IsConfigured => !string.IsNullOrWhiteSpace(Settings.NzbFolder);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return !string.IsNullOrWhiteSpace(Settings.NzbFolder);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IEnumerable<DownloadClientItem> GetItems()
|
public override IEnumerable<DownloadClientItem> GetItems()
|
||||||
{
|
{
|
||||||
|
@ -189,13 +189,7 @@ private IEnumerable<DownloadClientItem> GetHistory()
|
|||||||
return historyItems;
|
return historyItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Name
|
public override string Name => "SABnzbd";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "SABnzbd";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IEnumerable<DownloadClientItem> GetItems()
|
public override IEnumerable<DownloadClientItem> GetItems()
|
||||||
{
|
{
|
||||||
|
@ -7,13 +7,7 @@ public class SabnzbdJsonError
|
|||||||
public string Status { get; set; }
|
public string Status { get; set; }
|
||||||
public string Error { get; set; }
|
public string Error { get; set; }
|
||||||
|
|
||||||
public bool Failed
|
public bool Failed => !string.IsNullOrWhiteSpace(Status) &&
|
||||||
{
|
Status.Equals("false", StringComparison.InvariantCultureIgnoreCase);
|
||||||
get
|
|
||||||
{
|
|
||||||
return !string.IsNullOrWhiteSpace(Status) &&
|
|
||||||
Status.Equals("false", StringComparison.InvariantCultureIgnoreCase);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,12 +40,6 @@ protected override ValidationFailure ValidateVersion()
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Name
|
public override string Name => "Transmission";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "Transmission";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,12 +49,6 @@ protected override ValidationFailure ValidateVersion()
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Name
|
public override string Name => "Vuze";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "Vuze";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -71,13 +71,7 @@ protected override string AddFromTorrentFile(RemoteEpisode remoteEpisode, string
|
|||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Name
|
public override string Name => "qBittorrent";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "qBittorrent";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IEnumerable<DownloadClientItem> GetItems()
|
public override IEnumerable<DownloadClientItem> GetItems()
|
||||||
{
|
{
|
||||||
|
@ -94,21 +94,9 @@ protected override string AddFromTorrentFile(RemoteEpisode remoteEpisode, string
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Name
|
public override string Name => "rTorrent";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "rTorrent";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override ProviderMessage Message
|
public override ProviderMessage Message => new ProviderMessage("Sonarr is unable to remove torrents that have finished seeding when using rTorrent", ProviderMessageType.Warning);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new ProviderMessage("Sonarr is unable to remove torrents that have finished seeding when using rTorrent", ProviderMessageType.Warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IEnumerable<DownloadClientItem> GetItems()
|
public override IEnumerable<DownloadClientItem> GetItems()
|
||||||
{
|
{
|
||||||
|
@ -68,13 +68,7 @@ protected override string AddFromTorrentFile(RemoteEpisode remoteEpisode, string
|
|||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Name
|
public override string Name => "uTorrent";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "uTorrent";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IEnumerable<DownloadClientItem> GetItems()
|
public override IEnumerable<DownloadClientItem> GetItems()
|
||||||
{
|
{
|
||||||
|
@ -24,41 +24,17 @@ public abstract class DownloadClientBase<TSettings> : IDownloadClient
|
|||||||
|
|
||||||
public abstract string Name { get; }
|
public abstract string Name { get; }
|
||||||
|
|
||||||
public Type ConfigContract
|
public Type ConfigContract => typeof(TSettings);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return typeof(TSettings);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual ProviderMessage Message
|
public virtual ProviderMessage Message => null;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<ProviderDefinition> DefaultDefinitions
|
public IEnumerable<ProviderDefinition> DefaultDefinitions => new List<ProviderDefinition>();
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new List<ProviderDefinition>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ProviderDefinition Definition { get; set; }
|
public ProviderDefinition Definition { get; set; }
|
||||||
|
|
||||||
public virtual object RequestAction(string action, IDictionary<string, string> query) { return null; }
|
public virtual object RequestAction(string action, IDictionary<string, string> query) { return null; }
|
||||||
|
|
||||||
protected TSettings Settings
|
protected TSettings Settings => (TSettings)Definition.Settings;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return (TSettings)Definition.Settings;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected DownloadClientBase(IConfigService configService,
|
protected DownloadClientBase(IConfigService configService,
|
||||||
IDiskProvider diskProvider,
|
IDiskProvider diskProvider,
|
||||||
|
@ -34,21 +34,9 @@ protected TorrentClientBase(ITorrentFileInfoReader torrentFileInfoReader,
|
|||||||
_torrentFileInfoReader = torrentFileInfoReader;
|
_torrentFileInfoReader = torrentFileInfoReader;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override DownloadProtocol Protocol
|
public override DownloadProtocol Protocol => DownloadProtocol.Torrent;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return DownloadProtocol.Torrent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual bool PreferTorrentFile
|
public virtual bool PreferTorrentFile => false;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected abstract string AddFromMagnetLink(RemoteEpisode remoteEpisode, string hash, string magnetLink);
|
protected abstract string AddFromMagnetLink(RemoteEpisode remoteEpisode, string hash, string magnetLink);
|
||||||
protected abstract string AddFromTorrentFile(RemoteEpisode remoteEpisode, string hash, string filename, byte[] fileContent);
|
protected abstract string AddFromTorrentFile(RemoteEpisode remoteEpisode, string hash, string filename, byte[] fileContent);
|
||||||
|
@ -28,13 +28,7 @@ protected UsenetClientBase(IHttpClient httpClient,
|
|||||||
_httpClient = httpClient;
|
_httpClient = httpClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override DownloadProtocol Protocol
|
public override DownloadProtocol Protocol => DownloadProtocol.Usenet;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return DownloadProtocol.Usenet;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected abstract string AddFromNzbFile(RemoteEpisode remoteEpisode, string filename, byte[] fileContent);
|
protected abstract string AddFromNzbFile(RemoteEpisode remoteEpisode, string filename, byte[] fileContent);
|
||||||
|
|
||||||
|
@ -48,13 +48,7 @@ public ExtraFileService(IExtraFileRepository<TExtraFile> repository,
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool PermanentlyDelete
|
public virtual bool PermanentlyDelete => false;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<TExtraFile> GetFilesBySeries(int seriesId)
|
public List<TExtraFile> GetFilesBySeries(int seriesId)
|
||||||
{
|
{
|
||||||
|
@ -23,13 +23,7 @@ public MediaBrowserMetadata(
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Name
|
public override string Name => "Emby (Legacy)";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "Emby (Legacy)";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override MetadataFile FindMetadataFile(Series series, string path)
|
public override MetadataFile FindMetadataFile(Series series, string path)
|
||||||
{
|
{
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user