Because it's 2016!
This commit is contained in:
parent
2e36538dcd
commit
aba613acd1
|
@ -27,7 +27,7 @@ namespace NzbDrone.Api.Authentication
|
||||||
_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 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
||||||
_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 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
||||||
{
|
{
|
||||||
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 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
||||||
_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 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
||||||
_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 @@ namespace NzbDrone.Api.Logs
|
||||||
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 @@ namespace NzbDrone.Api.Logs
|
||||||
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 @@ namespace NzbDrone.Api
|
||||||
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 @@ namespace NzbDrone.Api.Profiles.Languages
|
||||||
[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 @@ namespace NzbDrone.Api.REST
|
||||||
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 @@ namespace NzbDrone.Api
|
||||||
/// 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 @@ namespace NzbDrone.Automation.Test.PageModel
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
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 @@ namespace NzbDrone.Common.Cache
|
||||||
_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 @@ namespace NzbDrone.Common.Cache
|
||||||
_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 @@ namespace NzbDrone.Common
|
||||||
|
|
||||||
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 @@ namespace NzbDrone.Common.Disk
|
||||||
_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 @@ namespace NzbDrone.Common.Disk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 @@ namespace NzbDrone.Common.Disk
|
||||||
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 @@ namespace NzbDrone.Common.Disk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string FullPath
|
public string FullPath => _path;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _path;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string FileName
|
public string FileName
|
||||||
{
|
{
|
||||||
|
@ -162,13 +141,7 @@ namespace NzbDrone.Common.Disk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||||
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 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||||
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 @@ namespace NzbDrone.Common.Exceptron
|
||||||
/// <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 @@ namespace NzbDrone.Common.Exceptron.Message
|
||||||
/// <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 @@ namespace NzbDrone.Common.Exceptron.fastJSON
|
||||||
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 @@ namespace NzbDrone.Common.Http.Dispatchers
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool IsInvalid
|
public override bool IsInvalid => !_initialized || !_available;
|
||||||
{
|
|
||||||
get { return !_initialized || !_available; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,13 +49,7 @@ namespace NzbDrone.Common.Http
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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 @@ namespace NzbDrone.Common.Http
|
||||||
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 @@ namespace NzbDrone.Common.Http.Proxy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 @@ namespace NzbDrone.Common.TPL
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <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 @@ namespace TinyIoC
|
||||||
|
|
||||||
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 @@ namespace TinyIoC
|
||||||
/// <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 @@ namespace TinyIoC
|
||||||
/// 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 @@ namespace TinyIoC
|
||||||
{
|
{
|
||||||
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 @@ namespace TinyIoC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 @@ namespace TinyIoC
|
||||||
|
|
||||||
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 @@ namespace TinyIoC
|
||||||
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 @@ namespace TinyIoC
|
||||||
|
|
||||||
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 @@ namespace TinyIoC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 @@ namespace TinyIoC
|
||||||
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 @@ namespace TinyIoC
|
||||||
_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 @@ namespace TinyIoC
|
||||||
_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 @@ namespace TinyIoC
|
||||||
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 @@ namespace TinyIoC
|
||||||
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 @@ namespace TinyIoC
|
||||||
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 @@ namespace TinyIoC
|
||||||
_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 @@ namespace TinyIoC
|
||||||
/// <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 @@ namespace NzbDrone.Core.Test.Framework
|
||||||
|
|
||||||
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 @@ namespace NzbDrone.Core.Test.Framework
|
||||||
{
|
{
|
||||||
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 @@ namespace NzbDrone.Core.Test.Framework
|
||||||
}
|
}
|
||||||
|
|
||||||
[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 @@ namespace NzbDrone.Core.Test.InstrumentationTests
|
||||||
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 @@ namespace NzbDrone.Core.Analytics
|
||||||
_configFileProvider = configFileProvider;
|
_configFileProvider = configFileProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsEnabled
|
public bool IsEnabled => _configFileProvider.AnalyticsEnabled && RuntimeInfoBase.IsProduction;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _configFileProvider.AnalyticsEnabled && RuntimeInfoBase.IsProduction;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -6,21 +6,9 @@ namespace NzbDrone.Core.Backup
|
||||||
{
|
{
|
||||||
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 @@ namespace NzbDrone.Core.Configuration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 @@ namespace NzbDrone.Core.Configuration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 @@ namespace NzbDrone.Core.Configuration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 @@ namespace NzbDrone.Core.Configuration
|
||||||
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 @@ namespace NzbDrone.Core.Datastore
|
||||||
_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 @@ namespace NzbDrone.Core.Datastore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual bool PublishModelEvents
|
protected virtual bool PublishModelEvents => false;
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,12 +46,6 @@ namespace NzbDrone.Core.Datastore.Converters
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Type DbType
|
public Type DbType => typeof(int);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return typeof(int);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -60,12 +60,6 @@ namespace NzbDrone.Core.Datastore.Converters
|
||||||
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 @@ namespace NzbDrone.Core.Datastore.Converters
|
||||||
return value.ToString();
|
return value.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Type DbType
|
public Type DbType => typeof(string);
|
||||||
{
|
|
||||||
get { return typeof(string); }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,9 +31,6 @@ namespace NzbDrone.Core.Datastore.Converters
|
||||||
return value.FullPath;
|
return value.FullPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Type DbType
|
public Type DbType => typeof(string);
|
||||||
{
|
|
||||||
get { return typeof(string); }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,13 +38,7 @@ namespace NzbDrone.Core.Datastore.Converters
|
||||||
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 @@ namespace NzbDrone.Core.Datastore.Converters
|
||||||
return dateTime.ToUniversalTime();
|
return dateTime.ToUniversalTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Type DbType
|
public Type DbType => typeof(DateTime);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return typeof(DateTime);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -25,10 +25,7 @@ namespace NzbDrone.Core.Datastore
|
||||||
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 @@ namespace NzbDrone.Core.Datastore
|
||||||
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 @@ namespace NzbDrone.Core.Datastore.Migration.Framework
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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 @@ namespace NzbDrone.Core.Datastore.Migration.Framework
|
||||||
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 @@ namespace NzbDrone.Core.DecisionEngine
|
||||||
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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
{
|
{
|
||||||
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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
||||||
_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 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||||
_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 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
|
||||||
|
|
||||||
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 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
|
||||||
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 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
|
||||||
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 @@ namespace NzbDrone.Core.Download.Clients.Deluge
|
||||||
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 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
|
||||||
_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 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex
|
||||||
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 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex
|
||||||
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 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
||||||
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 @@ namespace NzbDrone.Core.Download.Clients.Pneumatic
|
||||||
_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 @@ namespace NzbDrone.Core.Download.Clients.Pneumatic
|
||||||
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 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
||||||
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 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
||||||
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 @@ namespace NzbDrone.Core.Download.Clients.Transmission
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Name
|
public override string Name => "Transmission";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "Transmission";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,12 +49,6 @@ namespace NzbDrone.Core.Download.Clients.Vuze
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Name
|
public override string Name => "Vuze";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "Vuze";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -71,13 +71,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
||||||
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 @@ namespace NzbDrone.Core.Download.Clients.RTorrent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
|
||||||
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 @@ namespace NzbDrone.Core.Download
|
||||||
|
|
||||||
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 @@ namespace NzbDrone.Core.Download
|
||||||
_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 @@ namespace NzbDrone.Core.Download
|
||||||
_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 @@ namespace NzbDrone.Core.Extras.Files
|
||||||
_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 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.MediaBrowser
|
||||||
_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