removed dead code

pull/3113/head
Keivan Beigi 10 years ago
parent 907023ca10
commit 28f7e256b2

@ -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;

@ -382,35 +382,6 @@ namespace NzbDrone.Core.Test.Download
VerifyNoRetryDownload();
}
[Test]
public void should_retry_if_interval_expired()
{
GivenFailedDownloadClientHistory();
var historyGrabbed = Builder<History.History>.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()
{

@ -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());

@ -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;
}

@ -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;

@ -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;
}

@ -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;
}

@ -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;

@ -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;

@ -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<TrackedDownload[]>(GetType());
}
public TrackedDownload[] GetTrackedDownloads()
private TrackedDownload[] GetTrackedDownloads()
{
return _trackedDownloadCache.Get("tracked", () => new TrackedDownload[0]);
}

@ -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;
}

@ -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; }
}
}
}

@ -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;

@ -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<UpdatePackage> GetRecentUpdatePackages()
{
var branch = _configFileProvider.Branch;
return _updatePackageProvider.GetRecentUpdates(branch, BuildInfo.Version.Major);
return _updatePackageProvider.GetRecentUpdates(branch);
}
}
}

@ -9,7 +9,7 @@ namespace NzbDrone.Core.Update
public interface IUpdatePackageProvider
{
UpdatePackage GetLatestUpdate(string branch, Version currentVersion);
List<UpdatePackage> GetRecentUpdates(string branch, int majorVersion);
List<UpdatePackage> GetRecentUpdates(string branch);
}
public class UpdatePackageProvider : IUpdatePackageProvider
@ -37,7 +37,7 @@ namespace NzbDrone.Core.Update
return update.UpdatePackage;
}
public List<UpdatePackage> GetRecentUpdates(string branch, int majorVersion)
public List<UpdatePackage> GetRecentUpdates(string branch)
{
var request = _requestBuilder.Build("/update/{branch}/changes");
request.UriBuilder.SetQueryParam("os", OsInfo.Os.ToString().ToLowerInvariant());

Loading…
Cancel
Save