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 @@ namespace NzbDrone.Api.RemotePathMappings { private readonly IRemotePathMappingService _remotePathMappingService; - public RemotePathMappingModule(IConfigService configService, IRemotePathMappingService remotePathMappingService, PathExistsValidator pathExistsValidator) + public RemotePathMappingModule(IRemotePathMappingService remotePathMappingService, PathExistsValidator pathExistsValidator) { _remotePathMappingService = remotePathMappingService; diff --git a/src/NzbDrone.Core.Test/Download/FailedDownloadServiceFixture.cs b/src/NzbDrone.Core.Test/Download/FailedDownloadServiceFixture.cs index f95b47bf4..e2b99256d 100644 --- a/src/NzbDrone.Core.Test/Download/FailedDownloadServiceFixture.cs +++ b/src/NzbDrone.Core.Test/Download/FailedDownloadServiceFixture.cs @@ -382,35 +382,6 @@ namespace NzbDrone.Core.Test.Download VerifyNoRetryDownload(); } - [Test] - public void should_retry_if_interval_expired() - { - GivenFailedDownloadClientHistory(); - - var historyGrabbed = Builder.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 @@ namespace NzbDrone.Core.Test.UpdateTests { 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; 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 @@ namespace NzbDrone.Core.Download.Clients.Nzbget 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.Configuration; 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 @@ namespace NzbDrone.Core.Download.Clients.Pneumatic 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 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd 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.Common.Http; 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 @@ namespace NzbDrone.Core.Download.Clients.UsenetBlackhole 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 @@ namespace NzbDrone.Core.Download } } - 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 @@ namespace NzbDrone.Core.Download _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.Common.Http; 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 @@ namespace NzbDrone.Core.Download protected UsenetClientBase(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/Indexers/Exceptions/IndexerException.cs b/src/NzbDrone.Core/Indexers/Exceptions/IndexerException.cs index 8959016df..2d6739199 100644 --- a/src/NzbDrone.Core/Indexers/Exceptions/IndexerException.cs +++ b/src/NzbDrone.Core/Indexers/Exceptions/IndexerException.cs @@ -8,21 +8,9 @@ namespace NzbDrone.Core.Indexers.Exceptions { public class IndexerException : NzbDroneException { - private readonly IndexerResponse _indexerResponse; - - public IndexerException(IndexerResponse response, string message, params object[] args) + public IndexerException(string message, params object[] args) : base(message, args) { } - - public IndexerException(IndexerResponse response, string message) - : base(message) - { - } - - public IndexerResponse Response - { - get { return _indexerResponse; } - } } } diff --git a/src/NzbDrone.Core/Indexers/RssParser.cs b/src/NzbDrone.Core/Indexers/RssParser.cs index d7ab279a9..9c4b77c24 100644 --- a/src/NzbDrone.Core/Indexers/RssParser.cs +++ b/src/NzbDrone.Core/Indexers/RssParser.cs @@ -75,7 +75,7 @@ namespace NzbDrone.Core.Indexers { if (indexerResponse.HttpResponse.StatusCode != System.Net.HttpStatusCode.OK) { - throw new IndexerException(indexerResponse, "Indexer API call resulted in an unexpected StatusCode [{0}]", indexerResponse.HttpResponse.StatusCode); + throw new IndexerException("Indexer API call resulted in an unexpected StatusCode [{0}]", indexerResponse.HttpResponse.StatusCode); } return true; diff --git a/src/NzbDrone.Core/Update/RecentUpdateProvider.cs b/src/NzbDrone.Core/Update/RecentUpdateProvider.cs index 4245cdde8..96a915694 100644 --- a/src/NzbDrone.Core/Update/RecentUpdateProvider.cs +++ b/src/NzbDrone.Core/Update/RecentUpdateProvider.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Core.Configuration; namespace NzbDrone.Core.Update @@ -24,7 +23,7 @@ namespace NzbDrone.Core.Update public List 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 @@ namespace NzbDrone.Core.Update 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());