diff --git a/src/NzbDrone.Api/RemotePathMappings/RemotePathMappingModule.cs b/src/NzbDrone.Api/RemotePathMappings/RemotePathMappingModule.cs index 053c42c7c..9a894e20f 100644 --- a/src/NzbDrone.Api/RemotePathMappings/RemotePathMappingModule.cs +++ b/src/NzbDrone.Api/RemotePathMappings/RemotePathMappingModule.cs @@ -2,7 +2,6 @@ using FluentValidation; using NzbDrone.Api.Config; using NzbDrone.Api.Mapping; -using NzbDrone.Core.Configuration; using NzbDrone.Core.RemotePathMappings; using NzbDrone.Core.Validation.Paths; using Omu.ValueInjecter; @@ -13,7 +12,7 @@ public class RemotePathMappingModule : NzbDroneRestModule.CreateListOfSize(1) - .Build() - .ToList(); - - historyGrabbed.First().Data.Add("downloadClient", "SabnzbdClient"); - historyGrabbed.First().Data.Add("downloadClientId", _failed.First().DownloadClientId); - historyGrabbed.First().Data.Add("ageHours", "1"); - - GivenGrabbedHistory(historyGrabbed); - GivenNoFailedHistory(); - GivenGracePeriod(6); - GivenRetryLimit(1); - - Subject.Execute(new CheckForFinishedDownloadCommand()); - - Subject.GetTrackedDownloads().First().LastRetry -= TimeSpan.FromMinutes(10); - - Subject.Execute(new CheckForFinishedDownloadCommand()); - - VerifyRetryDownload(); - - ExceptionVerification.IgnoreWarns(); - } - [Test] public void should_process_if_retry_count_is_greater_than_grace_period() { diff --git a/src/NzbDrone.Core.Test/UpdateTests/UpdatePackageProviderFixture.cs b/src/NzbDrone.Core.Test/UpdateTests/UpdatePackageProviderFixture.cs index 928b34241..cece2dedc 100644 --- a/src/NzbDrone.Core.Test/UpdateTests/UpdatePackageProviderFixture.cs +++ b/src/NzbDrone.Core.Test/UpdateTests/UpdatePackageProviderFixture.cs @@ -29,7 +29,7 @@ public void should_get_recent_updates() { const string branch = "master"; UseRealHttp(); - var recent = Subject.GetRecentUpdates(branch, 2); + var recent = Subject.GetRecentUpdates(branch); recent.Should().NotBeEmpty(); recent.Should().OnlyContain(c => c.Hash.IsNotNullOrWhiteSpace()); diff --git a/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs b/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs index 800515156..94fbeeda2 100644 --- a/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs +++ b/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs @@ -8,7 +8,6 @@ using NzbDrone.Common.Disk; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; -using NzbDrone.Core.Indexers; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Validation; @@ -27,7 +26,7 @@ public Nzbget(INzbgetProxy proxy, IParsingService parsingService, IRemotePathMappingService remotePathMappingService, Logger logger) - : base(httpClient, configService, diskProvider, parsingService, remotePathMappingService, logger) + : base(httpClient, configService, diskProvider, remotePathMappingService, logger) { _proxy = proxy; } diff --git a/src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetProxy.cs b/src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetProxy.cs index d2081b611..e58cb0a96 100644 --- a/src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetProxy.cs +++ b/src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetProxy.cs @@ -1,9 +1,7 @@ using System; using System.Collections.Generic; -using System.IO; using System.Linq; using NLog; -using NzbDrone.Common.Extensions; using NzbDrone.Common.Serializer; using NzbDrone.Core.Rest; using RestSharp; diff --git a/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs b/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs index d55e4e5dc..fda938046 100644 --- a/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs +++ b/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs @@ -10,7 +10,6 @@ using NzbDrone.Core.Indexers; using NzbDrone.Core.RemotePathMappings; using NzbDrone.Core.Organizer; -using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; namespace NzbDrone.Core.Download.Clients.Pneumatic @@ -22,10 +21,9 @@ public class Pneumatic : DownloadClientBase public Pneumatic(IHttpClient httpClient, IConfigService configService, IDiskProvider diskProvider, - IParsingService parsingService, IRemotePathMappingService remotePathMappingService, Logger logger) - : base(configService, diskProvider, parsingService, remotePathMappingService, logger) + : base(configService, diskProvider, remotePathMappingService, logger) { _httpClient = httpClient; } diff --git a/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs b/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs index d35204d0e..150fe24cc 100644 --- a/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs +++ b/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs @@ -27,7 +27,7 @@ public Sabnzbd(ISabnzbdProxy proxy, IParsingService parsingService, IRemotePathMappingService remotePathMappingService, Logger logger) - : base(httpClient, configService, diskProvider, parsingService, remotePathMappingService, logger) + : base(httpClient, configService, diskProvider, remotePathMappingService, logger) { _proxy = proxy; } diff --git a/src/NzbDrone.Core/Download/Clients/UsenetBlackhole/UsenetBlackhole.cs b/src/NzbDrone.Core/Download/Clients/UsenetBlackhole/UsenetBlackhole.cs index bc760fb4c..231c6c52b 100644 --- a/src/NzbDrone.Core/Download/Clients/UsenetBlackhole/UsenetBlackhole.cs +++ b/src/NzbDrone.Core/Download/Clients/UsenetBlackhole/UsenetBlackhole.cs @@ -8,7 +8,6 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers; using NzbDrone.Core.Organizer; -using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; using NzbDrone.Core.MediaFiles; using NLog; @@ -27,10 +26,9 @@ public UsenetBlackhole(IDiskScanService diskScanService, IHttpClient httpClient, IConfigService configService, IDiskProvider diskProvider, - IParsingService parsingService, IRemotePathMappingService remotePathMappingService, Logger logger) - : base(configService, diskProvider, parsingService, remotePathMappingService, logger) + : base(configService, diskProvider, remotePathMappingService, logger) { _diskScanService = diskScanService; _httpClient = httpClient; diff --git a/src/NzbDrone.Core/Download/DownloadClientBase.cs b/src/NzbDrone.Core/Download/DownloadClientBase.cs index b6a118580..bfa6a2275 100644 --- a/src/NzbDrone.Core/Download/DownloadClientBase.cs +++ b/src/NzbDrone.Core/Download/DownloadClientBase.cs @@ -1,10 +1,8 @@ using System; using System.IO; using System.Collections.Generic; -using NzbDrone.Common; using NzbDrone.Common.Disk; using NzbDrone.Core.Indexers; -using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; using NzbDrone.Core.ThingiProvider; using NzbDrone.Core.Configuration; @@ -49,7 +47,10 @@ protected TSettings Settings } } - protected DownloadClientBase(IConfigService configService, IDiskProvider diskProvider, IParsingService parsingService, IRemotePathMappingService remotePathMappingService, Logger logger) + protected DownloadClientBase(IConfigService configService, + IDiskProvider diskProvider, + IRemotePathMappingService remotePathMappingService, + Logger logger) { _configService = configService; _diskProvider = diskProvider; diff --git a/src/NzbDrone.Core/Download/DownloadTrackingService.cs b/src/NzbDrone.Core/Download/DownloadTrackingService.cs index ea3c0230f..c3ae2e756 100644 --- a/src/NzbDrone.Core/Download/DownloadTrackingService.cs +++ b/src/NzbDrone.Core/Download/DownloadTrackingService.cs @@ -16,7 +16,6 @@ namespace NzbDrone.Core.Download { public interface IDownloadTrackingService { - TrackedDownload[] GetTrackedDownloads(); TrackedDownload[] GetCompletedDownloads(); TrackedDownload[] GetQueuedDownloads(); @@ -64,7 +63,7 @@ public DownloadTrackingService(IProvideDownloadClient downloadClientProvider, _trackedDownloadCache = cacheManager.GetCache(GetType()); } - public TrackedDownload[] GetTrackedDownloads() + private TrackedDownload[] GetTrackedDownloads() { return _trackedDownloadCache.Get("tracked", () => new TrackedDownload[0]); } diff --git a/src/NzbDrone.Core/Download/UsenetClientBase.cs b/src/NzbDrone.Core/Download/UsenetClientBase.cs index 0a684a398..b80c43259 100644 --- a/src/NzbDrone.Core/Download/UsenetClientBase.cs +++ b/src/NzbDrone.Core/Download/UsenetClientBase.cs @@ -10,7 +10,6 @@ using NzbDrone.Core.Exceptions; using NzbDrone.Core.Indexers; using NzbDrone.Core.Organizer; -using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; using NzbDrone.Core.ThingiProvider; using NzbDrone.Core.Configuration; @@ -27,10 +26,9 @@ public abstract class UsenetClientBase : DownloadClientBase GetRecentUpdatePackages() { var branch = _configFileProvider.Branch; - return _updatePackageProvider.GetRecentUpdates(branch, BuildInfo.Version.Major); + return _updatePackageProvider.GetRecentUpdates(branch); } } } diff --git a/src/NzbDrone.Core/Update/UpdatePackageProvider.cs b/src/NzbDrone.Core/Update/UpdatePackageProvider.cs index 3a2fabe19..b31b4bb78 100644 --- a/src/NzbDrone.Core/Update/UpdatePackageProvider.cs +++ b/src/NzbDrone.Core/Update/UpdatePackageProvider.cs @@ -9,7 +9,7 @@ namespace NzbDrone.Core.Update public interface IUpdatePackageProvider { UpdatePackage GetLatestUpdate(string branch, Version currentVersion); - List GetRecentUpdates(string branch, int majorVersion); + List GetRecentUpdates(string branch); } public class UpdatePackageProvider : IUpdatePackageProvider @@ -37,7 +37,7 @@ public UpdatePackage GetLatestUpdate(string branch, Version currentVersion) return update.UpdatePackage; } - public List GetRecentUpdates(string branch, int majorVersion) + public List GetRecentUpdates(string branch) { var request = _requestBuilder.Build("/update/{branch}/changes"); request.UriBuilder.SetQueryParam("os", OsInfo.Os.ToString().ToLowerInvariant());