From 6a743a879286473183ce3eeddcda8b2be00f096e Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Fri, 3 Oct 2014 16:29:52 -0700 Subject: [PATCH] removed dead code --- .../Authentication/AuthenticationService.cs | 3 +- src/NzbDrone.Api/Indexers/ReleaseModule.cs | 4 +- src/NzbDrone.Common/ArchiveService.cs | 3 +- .../Xbmc/GetJsonVersionFixture.cs | 60 ---------- .../NzbDrone.Core.Test.csproj | 3 - .../QualityDefinitionRepositoryFixture.cs | 40 ------- .../FreeSpaceOnDrivesFixture.cs | 109 ------------------ .../RootFolderServiceFixture.cs | 43 +------ .../DecisionEngine/DownloadDecisionMaker.cs | 3 +- .../Download/Pending/PendingReleaseService.cs | 1 - src/NzbDrone.Core/Indexers/RssSyncService.cs | 9 +- .../Messaging/Commands/ICommandExecutor.cs | 1 - .../Notifications/Xbmc/XbmcService.cs | 3 +- src/NzbDrone.Core/Parser/ParsingService.cs | 4 +- .../Qualities/QualityDefinitionRepository.cs | 13 +-- .../RootFolders/RootFolderService.cs | 30 +---- src/NzbDrone.Core/Tv/SeriesRepository.cs | 6 - src/NzbDrone.Core/Tv/SeriesService.cs | 14 +-- .../Update/InstallUpdateService.cs | 8 +- 19 files changed, 15 insertions(+), 342 deletions(-) delete mode 100644 src/NzbDrone.Core.Test/NotificationTests/Xbmc/GetJsonVersionFixture.cs delete mode 100644 src/NzbDrone.Core.Test/Qualities/QualityDefinitionRepositoryFixture.cs delete mode 100644 src/NzbDrone.Core.Test/RootFolderTests/FreeSpaceOnDrivesFixture.cs diff --git a/src/NzbDrone.Api/Authentication/AuthenticationService.cs b/src/NzbDrone.Api/Authentication/AuthenticationService.cs index 997e3a93b..0ffde774d 100644 --- a/src/NzbDrone.Api/Authentication/AuthenticationService.cs +++ b/src/NzbDrone.Api/Authentication/AuthenticationService.cs @@ -11,7 +11,6 @@ namespace NzbDrone.Api.Authentication { public interface IAuthenticationService : IUserValidator { - bool Enabled { get; } bool IsAuthenticated(NancyContext context); } @@ -43,7 +42,7 @@ namespace NzbDrone.Api.Authentication return null; } - public bool Enabled + private bool Enabled { get { diff --git a/src/NzbDrone.Api/Indexers/ReleaseModule.cs b/src/NzbDrone.Api/Indexers/ReleaseModule.cs index b12604cb8..bc2f18038 100644 --- a/src/NzbDrone.Api/Indexers/ReleaseModule.cs +++ b/src/NzbDrone.Api/Indexers/ReleaseModule.cs @@ -14,7 +14,7 @@ using System.Linq; using Nancy.ModelBinding; using NzbDrone.Api.Extensions; using NzbDrone.Common.Cache; -using SystemNetHttpStatusCode = System.Net.HttpStatusCode; +using HttpStatusCode = System.Net.HttpStatusCode; namespace NzbDrone.Api.Indexers { @@ -69,7 +69,7 @@ namespace NzbDrone.Api.Indexers catch (ReleaseDownloadException ex) { _logger.ErrorException(ex.Message, ex); - throw new NzbDroneClientException(SystemNetHttpStatusCode.Conflict, "Getting release from indexer failed"); + throw new NzbDroneClientException(HttpStatusCode.Conflict, "Getting release from indexer failed"); } return release.AsResponse(); diff --git a/src/NzbDrone.Common/ArchiveService.cs b/src/NzbDrone.Common/ArchiveService.cs index 1899d8f3d..a5716348d 100644 --- a/src/NzbDrone.Common/ArchiveService.cs +++ b/src/NzbDrone.Common/ArchiveService.cs @@ -12,7 +12,6 @@ namespace NzbDrone.Common public interface IArchiveService { void Extract(string compressedFile, string destination); - void ExtractZip(string compressedFile, string destination); void CreateZip(string path, params string[] files); } @@ -57,7 +56,7 @@ namespace NzbDrone.Common } } - public void ExtractZip(string compressedFile, string destination) + private void ExtractZip(string compressedFile, string destination) { using (var fileStream = File.OpenRead(compressedFile)) { diff --git a/src/NzbDrone.Core.Test/NotificationTests/Xbmc/GetJsonVersionFixture.cs b/src/NzbDrone.Core.Test/NotificationTests/Xbmc/GetJsonVersionFixture.cs deleted file mode 100644 index e101942f9..000000000 --- a/src/NzbDrone.Core.Test/NotificationTests/Xbmc/GetJsonVersionFixture.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using FizzWare.NBuilder; -using FluentAssertions; -using NUnit.Framework; -using NzbDrone.Core.Notifications.Xbmc; -using NzbDrone.Core.Notifications.Xbmc.Model; -using NzbDrone.Core.Test.Framework; - -namespace NzbDrone.Core.Test.NotificationTests.Xbmc -{ - [TestFixture] - public class GetJsonVersionFixture : CoreTest - { - private XbmcSettings _settings; - - [SetUp] - public void Setup() - { - _settings = Builder.CreateNew() - .Build(); - } - - private void GivenVersionResponse(String response) - { - Mocker.GetMock() - .Setup(s => s.GetJsonVersion(_settings)) - .Returns(response); - } - - [TestCase(3)] - [TestCase(2)] - [TestCase(0)] - public void should_get_version_from_major_only(int number) - { - GivenVersionResponse("{\"id\":10,\"jsonrpc\":\"2.0\",\"result\":{\"version\":" + number + "}}"); - - Subject.GetJsonVersion(_settings).Should().Be(new XbmcVersion(number)); - } - - [TestCase(5, 0, 0)] - [TestCase(6, 0, 0)] - [TestCase(6, 1, 0)] - [TestCase(6, 0, 23)] - [TestCase(0, 0, 0)] - public void should_get_version_from_semantic_version(int major, int minor, int patch) - { - GivenVersionResponse("{\"id\":10,\"jsonrpc\":\"2.0\",\"result\":{\"version\":{\"major\":" + major + ",\"minor\":" + minor + ",\"patch\":" + patch + "}}}"); - - Subject.GetJsonVersion(_settings).Should().Be(new XbmcVersion(major, minor, patch)); - } - - [Test] - public void should_get_version_zero_when_an_error_is_received() - { - GivenVersionResponse("{\"error\":{\"code\":-32601,\"message\":\"Method not found.\"},\"id\":10,\"jsonrpc\":\"2.0\"}"); - - Subject.GetJsonVersion(_settings).Should().Be(new XbmcVersion(0)); - } - } -} \ No newline at end of file diff --git a/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj b/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj index 9f6470bc7..5b6ba1781 100644 --- a/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj +++ b/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj @@ -226,7 +226,6 @@ - @@ -269,11 +268,9 @@ - - diff --git a/src/NzbDrone.Core.Test/Qualities/QualityDefinitionRepositoryFixture.cs b/src/NzbDrone.Core.Test/Qualities/QualityDefinitionRepositoryFixture.cs deleted file mode 100644 index 6156d9ab0..000000000 --- a/src/NzbDrone.Core.Test/Qualities/QualityDefinitionRepositoryFixture.cs +++ /dev/null @@ -1,40 +0,0 @@ -using NUnit.Framework; -using NzbDrone.Core.Datastore; -using NzbDrone.Core.Lifecycle; -using NzbDrone.Core.Qualities; -using NzbDrone.Core.Test.Framework; -using FluentAssertions; -using System.Collections.Generic; - -namespace NzbDrone.Core.Test.Qualities -{ - [TestFixture] - public class QualityDefinitionRepositoryFixture : DbTest - { - [SetUp] - public void Setup() - { - foreach (var qualityDefault in Quality.DefaultQualityDefinitions) - { - qualityDefault.Id = 0; - Storage.Insert(qualityDefault); - } - } - - [Test] - public void should_get_qualitydefinition_by_id() - { - var size = Subject.GetByQualityId((int)Quality.Bluray1080p); - - size.Should().NotBeNull(); - } - - [Test] - public void should_throw_with_id_if_not_exist() - { - var id = 123; - Assert.Throws(()=> Subject.GetByQualityId(id)).Message.Contains(id.ToString()); - } - - } -} \ No newline at end of file diff --git a/src/NzbDrone.Core.Test/RootFolderTests/FreeSpaceOnDrivesFixture.cs b/src/NzbDrone.Core.Test/RootFolderTests/FreeSpaceOnDrivesFixture.cs deleted file mode 100644 index 31b0d0da0..000000000 --- a/src/NzbDrone.Core.Test/RootFolderTests/FreeSpaceOnDrivesFixture.cs +++ /dev/null @@ -1,109 +0,0 @@ - - -using System; -using System.Collections.Generic; -using System.IO; -using FluentAssertions; -using Moq; -using NUnit.Framework; -using NzbDrone.Common; -using NzbDrone.Common.Disk; -using NzbDrone.Core.RootFolders; -using NzbDrone.Core.Test.Framework; -using NzbDrone.Test.Common; - -namespace NzbDrone.Core.Test.RootFolderTests -{ - [TestFixture] - - public class FreeSpaceOnDrivesFixture : CoreTest - { - [Test] - public void should_return_one_drive_when_only_one_root_dir_exists() - { - Mocker.GetMock() - .Setup(s => s.All()) - .Returns(new List { new RootFolder { Id = 1, Path = @"C:\Test\TV" } }); - - Mocker.GetMock() - .Setup(s => s.GetPathRoot(@"C:\Test\TV")) - .Returns(@"C:\"); - - Mocker.GetMock() - .Setup(s => s.GetAvailableSpace(@"C:\")) - .Returns(123456); - - var result = Subject.FreeSpaceOnDrives(); - - result.Should().HaveCount(1); - } - - [Test] - public void should_return_one_drive_when_two_rootDirs_on_the_same_drive_exist() - { - Mocker.GetMock() - .Setup(s => s.All()) - .Returns(new List { new RootFolder { Id = 1, Path = @"C:\Test\TV" }, - new RootFolder { Id = 2, Path = @"C:\Test\TV2" }}); - - Mocker.GetMock() - .Setup(s => s.GetPathRoot(It.IsAny())) - .Returns(@"C:\"); - - Mocker.GetMock() - .Setup(s => s.GetAvailableSpace(@"C:\")) - .Returns(123456); - - var result = Subject.FreeSpaceOnDrives(); - - result.Should().HaveCount(1); - } - - [Test] - public void should_return_two_drives_when_two_rootDirs_on_the_different_drive_exist() - { - Mocker.GetMock() - .Setup(s => s.All()) - .Returns(new List { new RootFolder { Id = 1, Path = @"C:\Test\TV" }, - new RootFolder { Id = 2, Path = @"D:\Test\TV" }}); - - Mocker.GetMock() - .Setup(s => s.GetPathRoot(@"C:\Test\TV")) - .Returns(@"C:\"); - - Mocker.GetMock() - .Setup(s => s.GetPathRoot(@"D:\Test\TV")) - .Returns(@"D:\"); - - Mocker.GetMock() - .Setup(s => s.GetAvailableSpace(It.IsAny())) - .Returns(123456); - - var result = Subject.FreeSpaceOnDrives(); - - result.Should().HaveCount(2); - } - - [Test] - public void should_skip_rootDir_if_not_found_on_disk() - { - Mocker.GetMock() - .Setup(s => s.All()) - .Returns(new List { new RootFolder { Id = 1, Path = @"C:\Test\TV" } }); - - Mocker.GetMock() - .Setup(s => s.GetPathRoot(@"C:\Test\TV")) - .Returns(@"C:\"); - - Mocker.GetMock() - .Setup(s => s.GetAvailableSpace(It.IsAny())) - .Throws(new DirectoryNotFoundException()); - - var result = Subject.FreeSpaceOnDrives(); - - result.Should().HaveCount(0); - - ExceptionVerification.ExpectedWarns(1); - } - } -} \ No newline at end of file diff --git a/src/NzbDrone.Core.Test/RootFolderTests/RootFolderServiceFixture.cs b/src/NzbDrone.Core.Test/RootFolderTests/RootFolderServiceFixture.cs index f8e9e1ce0..ce6724040 100644 --- a/src/NzbDrone.Core.Test/RootFolderTests/RootFolderServiceFixture.cs +++ b/src/NzbDrone.Core.Test/RootFolderTests/RootFolderServiceFixture.cs @@ -61,28 +61,6 @@ namespace NzbDrone.Core.Test.RootFolderTests Mocker.GetMock().Verify(c => c.Delete(1), Times.Once()); } - [Test] - public void should_return_empty_list_when_folder_doesnt_exist() - { - WithNonExistingFolder(); - - Mocker.GetMock().Setup(c => c.All()).Returns(new List()); - - const string path = "d:\\bad folder"; - - var result = Subject.GetUnmappedFolders(path); - - result.Should().NotBeNull(); - result.Should().BeEmpty(); - Mocker.GetMock().Verify(c => c.GetDirectories(It.IsAny()), Times.Never()); - } - - [Test] - public void GetUnmappedFolders_throw_on_empty_folders() - { - Assert.Throws(() => Mocker.Resolve().GetUnmappedFolders("")); - } - [TestCase("")] [TestCase(null)] [TestCase("BAD PATH")] @@ -101,25 +79,6 @@ namespace NzbDrone.Core.Test.RootFolderTests Assert.Throws(() => Subject.Add(new RootFolder { Path = @"C:\TV".AsOsAgnostic() })); } - [Test] - public void should_not_include_system_files_and_folders() - { - Mocker.GetMock() - .Setup(s => s.GetDirectories(It.IsAny())) - .Returns(new string[] - { - @"C:\30 Rock".AsOsAgnostic(), - @"C:\$Recycle.Bin".AsOsAgnostic(), - @"C:\.AppleDouble".AsOsAgnostic(), - @"C:\Test\.AppleDouble".AsOsAgnostic() - }); - - Mocker.GetMock() - .Setup(s => s.GetAllSeries()) - .Returns(new List()); - - Subject.GetUnmappedFolders(@"C:\") - .Should().OnlyContain(u => u.Path == @"C:\30 Rock".AsOsAgnostic()); - } + } } \ No newline at end of file diff --git a/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs b/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs index 8aa998ad4..722b31b73 100644 --- a/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs +++ b/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs @@ -15,7 +15,6 @@ namespace NzbDrone.Core.DecisionEngine { List GetRssDecision(List reports); List GetSearchDecision(List reports, SearchCriteriaBase searchCriteriaBase); - DownloadDecision GetDecisionForReport(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria = null); } public class DownloadDecisionMaker : IMakeDownloadDecision @@ -109,7 +108,7 @@ namespace NzbDrone.Core.DecisionEngine } } - public DownloadDecision GetDecisionForReport(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria = null) + private DownloadDecision GetDecisionForReport(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria = null) { var reasons = _specifications.Select(c => EvaluateSpec(c, remoteEpisode, searchCriteria)) .Where(c => c != null); diff --git a/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs b/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs index a800bfe84..4947bb615 100644 --- a/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs +++ b/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs @@ -7,7 +7,6 @@ using NzbDrone.Core.DecisionEngine; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; -using NzbDrone.Core.Profiles; using NzbDrone.Core.Qualities; using NzbDrone.Core.Tv; using NzbDrone.Core.Tv.Events; diff --git a/src/NzbDrone.Core/Indexers/RssSyncService.cs b/src/NzbDrone.Core/Indexers/RssSyncService.cs index c14453078..246bc801b 100644 --- a/src/NzbDrone.Core/Indexers/RssSyncService.cs +++ b/src/NzbDrone.Core/Indexers/RssSyncService.cs @@ -12,12 +12,7 @@ using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers { - public interface IRssSyncService - { - List Sync(); - } - - public class RssSyncService : IRssSyncService, IExecute + public class RssSyncService : IExecute { private readonly IFetchAndParseRss _rssFetcherAndParser; private readonly IMakeDownloadDecision _downloadDecisionMaker; @@ -45,7 +40,7 @@ namespace NzbDrone.Core.Indexers } - public List Sync() + private List Sync() { _logger.ProgressInfo("Starting RSS Sync"); diff --git a/src/NzbDrone.Core/Messaging/Commands/ICommandExecutor.cs b/src/NzbDrone.Core/Messaging/Commands/ICommandExecutor.cs index d456f6511..f3d5de25a 100644 --- a/src/NzbDrone.Core/Messaging/Commands/ICommandExecutor.cs +++ b/src/NzbDrone.Core/Messaging/Commands/ICommandExecutor.cs @@ -5,7 +5,6 @@ namespace NzbDrone.Core.Messaging.Commands public interface ICommandExecutor { void PublishCommand(TCommand command) where TCommand : Command; - void PublishCommand(string commandTypeName); void PublishCommand(string commandTypeName, DateTime? lastEecutionTime); Command PublishCommandAsync(TCommand command) where TCommand : Command; Command PublishCommandAsync(string commandTypeName); diff --git a/src/NzbDrone.Core/Notifications/Xbmc/XbmcService.cs b/src/NzbDrone.Core/Notifications/Xbmc/XbmcService.cs index a6f335eda..6175c7031 100644 --- a/src/NzbDrone.Core/Notifications/Xbmc/XbmcService.cs +++ b/src/NzbDrone.Core/Notifications/Xbmc/XbmcService.cs @@ -16,7 +16,6 @@ namespace NzbDrone.Core.Notifications.Xbmc void Notify(XbmcSettings settings, string title, string message); void Update(XbmcSettings settings, Series series); void Clean(XbmcSettings settings); - XbmcVersion GetJsonVersion(XbmcSettings settings); ValidationFailure Test(XbmcSettings settings); } @@ -58,7 +57,7 @@ namespace NzbDrone.Core.Notifications.Xbmc provider.Clean(settings); } - public XbmcVersion GetJsonVersion(XbmcSettings settings) + private XbmcVersion GetJsonVersion(XbmcSettings settings) { try { diff --git a/src/NzbDrone.Core/Parser/ParsingService.cs b/src/NzbDrone.Core/Parser/ParsingService.cs index d79fbdc77..d79bb47a7 100644 --- a/src/NzbDrone.Core/Parser/ParsingService.cs +++ b/src/NzbDrone.Core/Parser/ParsingService.cs @@ -4,7 +4,6 @@ using System.IO; using System.Linq; using NLog; using NzbDrone.Common; -using NzbDrone.Common.Disk; using NzbDrone.Core.DataAugmentation.Scene; using NzbDrone.Core.IndexerSearch.Definitions; using NzbDrone.Core.Parser.Model; @@ -20,7 +19,6 @@ namespace NzbDrone.Core.Parser RemoteEpisode Map(ParsedEpisodeInfo parsedEpisodeInfo, Int32 seriesId, IEnumerable episodeIds); List GetEpisodes(ParsedEpisodeInfo parsedEpisodeInfo, Series series, bool sceneSource, SearchCriteriaBase searchCriteria = null); ParsedEpisodeInfo ParseSpecialEpisodeTitle(string title, int tvRageId, SearchCriteriaBase searchCriteria = null); - ParsedEpisodeInfo ParseSpecialEpisodeTitle(string title, Series series); } public class ParsingService : IParsingService @@ -311,7 +309,7 @@ namespace NzbDrone.Core.Parser return ParseSpecialEpisodeTitle(title, series); } - public ParsedEpisodeInfo ParseSpecialEpisodeTitle(string title, Series series) + private ParsedEpisodeInfo ParseSpecialEpisodeTitle(string title, Series series) { // find special episode in series season 0 var episode = _episodeService.FindEpisodeByName(series.Id, 0, title); diff --git a/src/NzbDrone.Core/Qualities/QualityDefinitionRepository.cs b/src/NzbDrone.Core/Qualities/QualityDefinitionRepository.cs index 7e080c738..6aa7c9fb0 100644 --- a/src/NzbDrone.Core/Qualities/QualityDefinitionRepository.cs +++ b/src/NzbDrone.Core/Qualities/QualityDefinitionRepository.cs @@ -8,7 +8,6 @@ namespace NzbDrone.Core.Qualities { public interface IQualityDefinitionRepository : IBasicRepository { - QualityDefinition GetByQualityId(int qualityId); } public class QualityDefinitionRepository : BasicRepository, IQualityDefinitionRepository @@ -18,16 +17,6 @@ namespace NzbDrone.Core.Qualities { } - public QualityDefinition GetByQualityId(int qualityId) - { - try - { - return Query.Where(q => (int) q.Quality == qualityId).Single(); - } - catch (InvalidOperationException) - { - throw new ModelNotFoundException(typeof(QualityDefinition), qualityId); - } - } + } } diff --git a/src/NzbDrone.Core/RootFolders/RootFolderService.cs b/src/NzbDrone.Core/RootFolders/RootFolderService.cs index 83f886ee0..cf6928e15 100644 --- a/src/NzbDrone.Core/RootFolders/RootFolderService.cs +++ b/src/NzbDrone.Core/RootFolders/RootFolderService.cs @@ -17,8 +17,6 @@ namespace NzbDrone.Core.RootFolders List AllWithUnmappedFolders(); RootFolder Add(RootFolder rootDir); void Remove(int id); - List GetUnmappedFolders(string path); - Dictionary FreeSpaceOnDrives(); RootFolder Get(int id); } @@ -109,7 +107,7 @@ namespace NzbDrone.Core.RootFolders _rootFolderRepository.Delete(id); } - public List GetUnmappedFolders(string path) + private List GetUnmappedFolders(string path) { Logger.Debug("Generating list of unmapped folders"); if (String.IsNullOrEmpty(path)) @@ -140,32 +138,6 @@ namespace NzbDrone.Core.RootFolders return results; } - public Dictionary FreeSpaceOnDrives() - { - var freeSpace = new Dictionary(); - - var rootDirs = All(); - - foreach (var rootDir in rootDirs) - { - var pathRoot = _diskProvider.GetPathRoot(rootDir.Path); - - if (!freeSpace.ContainsKey(pathRoot)) - { - try - { - freeSpace.Add(pathRoot, _diskProvider.GetAvailableSpace(rootDir.Path)); - } - catch (Exception ex) - { - Logger.WarnException("Error getting disk space for: " + pathRoot, ex); - } - } - } - - return freeSpace; - } - public RootFolder Get(int id) { var rootFolder = _rootFolderRepository.Get(id); diff --git a/src/NzbDrone.Core/Tv/SeriesRepository.cs b/src/NzbDrone.Core/Tv/SeriesRepository.cs index 1819ac081..80d26a64d 100644 --- a/src/NzbDrone.Core/Tv/SeriesRepository.cs +++ b/src/NzbDrone.Core/Tv/SeriesRepository.cs @@ -13,7 +13,6 @@ namespace NzbDrone.Core.Tv Series FindByTitle(string cleanTitle, int year); Series FindByTvdbId(int tvdbId); Series FindByTvRageId(int tvRageId); - void SetSeriesType(int seriesId, SeriesTypes seriesTypes); } public class SeriesRepository : BasicRepository, ISeriesRepository @@ -54,10 +53,5 @@ namespace NzbDrone.Core.Tv { return Query.Where(s => s.TvRageId == tvRageId).SingleOrDefault(); } - - public void SetSeriesType(int seriesId, SeriesTypes seriesType) - { - SetFields(new Series { Id = seriesId, SeriesType = seriesType }, s => s.SeriesType); - } } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Tv/SeriesService.cs b/src/NzbDrone.Core/Tv/SeriesService.cs index 5d765dfd4..b444ff63f 100644 --- a/src/NzbDrone.Core/Tv/SeriesService.cs +++ b/src/NzbDrone.Core/Tv/SeriesService.cs @@ -18,12 +18,10 @@ namespace NzbDrone.Core.Tv Series GetSeries(int seriesId); List GetSeries(IEnumerable seriesIds); Series AddSeries(Series newSeries); - Series FindByTvdbId(int tvdbId); Series FindByTvRageId(int tvRageId); Series FindByTitle(string title); Series FindByTitle(string title, int year); Series FindByTitleInexact(string title); - void SetSeriesType(int seriesId, SeriesTypes seriesTypes); void DeleteSeries(int seriesId, bool deleteFiles); List GetAllSeries(); Series UpdateSeries(Series series); @@ -87,11 +85,6 @@ namespace NzbDrone.Core.Tv return newSeries; } - public Series FindByTvdbId(int tvdbId) - { - return _seriesRepository.FindByTvdbId(tvdbId); - } - public Series FindByTvRageId(int tvRageId) { return _seriesRepository.FindByTvRageId(tvRageId); @@ -103,7 +96,7 @@ namespace NzbDrone.Core.Tv if (tvdbId.HasValue) { - return FindByTvdbId(tvdbId.Value); + return _seriesRepository.FindByTvdbId(tvdbId.Value); } return _seriesRepository.FindByTitle(title.CleanSeriesTitle()); @@ -159,11 +152,6 @@ namespace NzbDrone.Core.Tv return _seriesRepository.FindByTitle(title, year); } - public void SetSeriesType(int seriesId, SeriesTypes seriesTypes) - { - _seriesRepository.SetSeriesType(seriesId, seriesTypes); - } - public void DeleteSeries(int seriesId, bool deleteFiles) { var series = _seriesRepository.Get(seriesId); diff --git a/src/NzbDrone.Core/Update/InstallUpdateService.cs b/src/NzbDrone.Core/Update/InstallUpdateService.cs index 64a17cafc..26a68fa4f 100644 --- a/src/NzbDrone.Core/Update/InstallUpdateService.cs +++ b/src/NzbDrone.Core/Update/InstallUpdateService.cs @@ -14,12 +14,8 @@ using NzbDrone.Core.Update.Commands; namespace NzbDrone.Core.Update { - public interface IInstallUpdates - { - void InstallUpdate(UpdatePackage updatePackage); - } - public class InstallUpdateService : IInstallUpdates, IExecute, IExecute + public class InstallUpdateService : IExecute, IExecute { private readonly ICheckUpdateService _checkUpdateService; private readonly Logger _logger; @@ -61,7 +57,7 @@ namespace NzbDrone.Core.Update _logger = logger; } - public void InstallUpdate(UpdatePackage updatePackage) + private void InstallUpdate(UpdatePackage updatePackage) { try {