From fabc4c84bde7463eec9cd04f8267b393d8741552 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Thu, 1 Dec 2011 17:33:17 -0800 Subject: [PATCH 1/3] Moved Jobs to their own folder. --- NzbDrone.Core.Test/CentralDispatchFixture.cs | 1 + NzbDrone.Core.Test/Framework/CoreTest.cs | 8 +--- .../JobTests/AppUpdateJobFixture.cs | 3 +- .../JobTests/BacklogSearchJobTest.cs | 1 + .../JobTests/BannerDownloadJobTest.cs | 1 + .../JobTests/DiskScanJobTest.cs | 1 + .../JobTests/ImportNewSeriesJobTest.cs | 1 + .../JobTests/RecentBacklogSearchJobTest.cs | 1 + NzbDrone.Core.Test/JobTests/SearchJobTest.cs | 1 + .../JobTests/SeasonSearchJobTest.cs | 1 + .../JobTests/SeriesSearchJobTest.cs | 1 + .../JobProviderTests/JobProviderFixture.cs | 1 + .../JobProviderTests/TestJobs.cs | 1 + NzbDrone.Core/CentralDispatch.cs | 1 + .../{Providers => }/Jobs/AppUpdateJob.cs | 7 ++- .../{Providers => }/Jobs/BacklogSearchJob.cs | 4 +- .../{Providers => }/Jobs/BannerDownloadJob.cs | 5 +- .../{Providers => }/Jobs/ConvertEpisodeJob.cs | 7 ++- .../{Providers => }/Jobs/DeleteSeriesJob.cs | 7 ++- .../{Providers => }/Jobs/DiskScanJob.cs | 4 +- .../{Providers => }/Jobs/EpisodeSearchJob.cs | 11 ++--- NzbDrone.Core/{Providers => }/Jobs/IJob.cs | 5 +- .../Jobs/ImportNewSeriesJob.cs | 5 +- .../{Providers => }/Jobs/JobProvider.cs | 8 ++-- .../Jobs/PostDownloadScanJob.cs | 6 ++- .../Jobs/RecentBacklogSearchJob.cs | 3 +- .../{Providers => }/Jobs/RenameEpisodeJob.cs | 7 +-- .../{Providers => }/Jobs/RenameSeasonJob.cs | 9 ++-- .../{Providers => }/Jobs/RssSyncJob.cs | 3 +- .../{Providers => }/Jobs/SeasonSearchJob.cs | 6 +-- .../{Providers => }/Jobs/SeriesSearchJob.cs | 6 +-- .../{Providers => }/Jobs/TrimLogsJob.cs | 8 +--- .../{Providers => }/Jobs/UpdateInfoJob.cs | 3 +- .../Jobs/UpdateSceneMappingsJob.cs | 8 ++-- NzbDrone.Core/Model/EpisodeRenameModel.cs | 12 ----- .../Model/ExternalNotificationType.cs | 9 ---- NzbDrone.Core/Model/SceneNameModel.cs | 8 ---- NzbDrone.Core/Model/UpdatePackage.cs | 2 - NzbDrone.Core/NzbDrone.Core.csproj | 46 +++++++++---------- .../Providers/Jobs/RenameSeriesJob.cs | 6 +-- NzbDrone.Core/WebTimer.cs | 1 + NzbDrone.Test.Common/TestBase.cs | 8 ++-- .../Controllers/AddSeriesController.cs | 1 + NzbDrone.Web/Controllers/CommandController.cs | 1 + NzbDrone.Web/Controllers/EpisodeController.cs | 1 + NzbDrone.Web/Controllers/HistoryController.cs | 1 + NzbDrone.Web/Controllers/SeriesController.cs | 1 + .../Controllers/SettingsController.cs | 9 ---- NzbDrone.Web/Controllers/SharedController.cs | 1 + NzbDrone.Web/Controllers/SystemController.cs | 1 + NzbDrone.Web/Controllers/UpdateController.cs | 1 + .../Scripts/jquery.validate.unobtrusive.js | 2 +- 52 files changed, 124 insertions(+), 132 deletions(-) rename NzbDrone.Core/{Providers => }/Jobs/AppUpdateJob.cs (96%) rename NzbDrone.Core/{Providers => }/Jobs/BacklogSearchJob.cs (96%) rename NzbDrone.Core/{Providers => }/Jobs/BannerDownloadJob.cs (96%) rename NzbDrone.Core/{Providers => }/Jobs/ConvertEpisodeJob.cs (93%) rename NzbDrone.Core/{Providers => }/Jobs/DeleteSeriesJob.cs (91%) rename NzbDrone.Core/{Providers => }/Jobs/DiskScanJob.cs (95%) rename NzbDrone.Core/{Providers => }/Jobs/EpisodeSearchJob.cs (84%) rename NzbDrone.Core/{Providers => }/Jobs/IJob.cs (92%) rename NzbDrone.Core/{Providers => }/Jobs/ImportNewSeriesJob.cs (97%) rename NzbDrone.Core/{Providers => }/Jobs/JobProvider.cs (98%) rename NzbDrone.Core/{Providers => }/Jobs/PostDownloadScanJob.cs (94%) rename NzbDrone.Core/{Providers => }/Jobs/RecentBacklogSearchJob.cs (95%) rename NzbDrone.Core/{Providers => }/Jobs/RenameEpisodeJob.cs (92%) rename NzbDrone.Core/{Providers => }/Jobs/RenameSeasonJob.cs (95%) rename NzbDrone.Core/{Providers => }/Jobs/RssSyncJob.cs (97%) rename NzbDrone.Core/{Providers => }/Jobs/SeasonSearchJob.cs (95%) rename NzbDrone.Core/{Providers => }/Jobs/SeriesSearchJob.cs (91%) rename NzbDrone.Core/{Providers => }/Jobs/TrimLogsJob.cs (80%) rename NzbDrone.Core/{Providers => }/Jobs/UpdateInfoJob.cs (97%) rename NzbDrone.Core/{Providers => }/Jobs/UpdateSceneMappingsJob.cs (79%) delete mode 100644 NzbDrone.Core/Model/EpisodeRenameModel.cs delete mode 100644 NzbDrone.Core/Model/ExternalNotificationType.cs delete mode 100644 NzbDrone.Core/Model/SceneNameModel.cs diff --git a/NzbDrone.Core.Test/CentralDispatchFixture.cs b/NzbDrone.Core.Test/CentralDispatchFixture.cs index 6120ce11f..d4f6bdf8a 100644 --- a/NzbDrone.Core.Test/CentralDispatchFixture.cs +++ b/NzbDrone.Core.Test/CentralDispatchFixture.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; using FluentAssertions; using NUnit.Framework; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Indexer; using NzbDrone.Core.Providers.Jobs; diff --git a/NzbDrone.Core.Test/Framework/CoreTest.cs b/NzbDrone.Core.Test/Framework/CoreTest.cs index 004b5a927..15f6c65e1 100644 --- a/NzbDrone.Core.Test/Framework/CoreTest.cs +++ b/NzbDrone.Core.Test/Framework/CoreTest.cs @@ -1,7 +1,5 @@ using System; using System.IO; -using NUnit.Framework; -using Ninject; using NzbDrone.Common; using NzbDrone.Core.Model.Notification; using NzbDrone.Test.Common; @@ -10,7 +8,6 @@ using PetaPoco; namespace NzbDrone.Core.Test.Framework { public class CoreTest : TestBase - // ReSharper disable InconsistentNaming { static CoreTest() { @@ -46,17 +43,16 @@ namespace NzbDrone.Core.Test.Framework return _db; } - private set { _db = value; } } protected void WithRealDb() { - Db = TestDbHelper.GetEmptyDatabase(); + _db = TestDbHelper.GetEmptyDatabase(); Mocker.SetConstant(Db); } - protected ProgressNotification MockNotification + protected static ProgressNotification MockNotification { get { diff --git a/NzbDrone.Core.Test/JobTests/AppUpdateJobFixture.cs b/NzbDrone.Core.Test/JobTests/AppUpdateJobFixture.cs index c4bb7cedb..24e9cc275 100644 --- a/NzbDrone.Core.Test/JobTests/AppUpdateJobFixture.cs +++ b/NzbDrone.Core.Test/JobTests/AppUpdateJobFixture.cs @@ -6,6 +6,7 @@ using FluentAssertions; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Model; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Core; @@ -121,7 +122,7 @@ namespace NzbDrone.Core.Test.JobTests } [Test] - [Category(IntegrationTest)] + [Category(INTEGRATION_TEST)] public void Should_download_and_extract_to_temp_folder() { diff --git a/NzbDrone.Core.Test/JobTests/BacklogSearchJobTest.cs b/NzbDrone.Core.Test/JobTests/BacklogSearchJobTest.cs index fe33fe733..3d47b87ec 100644 --- a/NzbDrone.Core.Test/JobTests/BacklogSearchJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/BacklogSearchJobTest.cs @@ -4,6 +4,7 @@ using System.Linq; using FizzWare.NBuilder; using Moq; using NUnit.Framework; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Model.Notification; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Jobs; diff --git a/NzbDrone.Core.Test/JobTests/BannerDownloadJobTest.cs b/NzbDrone.Core.Test/JobTests/BannerDownloadJobTest.cs index 07e98d88d..9a5b14d54 100644 --- a/NzbDrone.Core.Test/JobTests/BannerDownloadJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/BannerDownloadJobTest.cs @@ -5,6 +5,7 @@ using FizzWare.NBuilder; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Model.Notification; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Core; diff --git a/NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs b/NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs index 78224ad1f..3b16c2872 100644 --- a/NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using FizzWare.NBuilder; using Moq; using NUnit.Framework; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Model.Notification; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Jobs; diff --git a/NzbDrone.Core.Test/JobTests/ImportNewSeriesJobTest.cs b/NzbDrone.Core.Test/JobTests/ImportNewSeriesJobTest.cs index d1a435980..1df8f42af 100644 --- a/NzbDrone.Core.Test/JobTests/ImportNewSeriesJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/ImportNewSeriesJobTest.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using FizzWare.NBuilder; using Moq; using NUnit.Framework; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Model.Notification; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Jobs; diff --git a/NzbDrone.Core.Test/JobTests/RecentBacklogSearchJobTest.cs b/NzbDrone.Core.Test/JobTests/RecentBacklogSearchJobTest.cs index 3a21b6ff4..f1414e2bf 100644 --- a/NzbDrone.Core.Test/JobTests/RecentBacklogSearchJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/RecentBacklogSearchJobTest.cs @@ -5,6 +5,7 @@ using System.Linq; using FizzWare.NBuilder; using Moq; using NUnit.Framework; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Model.Notification; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Jobs; diff --git a/NzbDrone.Core.Test/JobTests/SearchJobTest.cs b/NzbDrone.Core.Test/JobTests/SearchJobTest.cs index 2e8db2fe4..9e1f3763b 100644 --- a/NzbDrone.Core.Test/JobTests/SearchJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/SearchJobTest.cs @@ -2,6 +2,7 @@ using System; using Moq; using NUnit.Framework; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Model.Notification; using NzbDrone.Core.Providers.Jobs; using NzbDrone.Test.Common.AutoMoq; diff --git a/NzbDrone.Core.Test/JobTests/SeasonSearchJobTest.cs b/NzbDrone.Core.Test/JobTests/SeasonSearchJobTest.cs index 8c4229ad2..b82d24bc5 100644 --- a/NzbDrone.Core.Test/JobTests/SeasonSearchJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/SeasonSearchJobTest.cs @@ -4,6 +4,7 @@ using System.Linq; using FizzWare.NBuilder; using Moq; using NUnit.Framework; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Model.Notification; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Jobs; diff --git a/NzbDrone.Core.Test/JobTests/SeriesSearchJobTest.cs b/NzbDrone.Core.Test/JobTests/SeriesSearchJobTest.cs index 4733718bc..bed82a859 100644 --- a/NzbDrone.Core.Test/JobTests/SeriesSearchJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/SeriesSearchJobTest.cs @@ -2,6 +2,7 @@ using Moq; using NUnit.Framework; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Model.Notification; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Jobs; diff --git a/NzbDrone.Core.Test/ProviderTests/JobProviderTests/JobProviderFixture.cs b/NzbDrone.Core.Test/ProviderTests/JobProviderTests/JobProviderFixture.cs index 8e0550f28..5c55fc2c9 100644 --- a/NzbDrone.Core.Test/ProviderTests/JobProviderTests/JobProviderFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/JobProviderTests/JobProviderFixture.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Threading; using FluentAssertions; using NUnit.Framework; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Model; using NzbDrone.Core.Providers.Jobs; using NzbDrone.Core.Test.Framework; diff --git a/NzbDrone.Core.Test/ProviderTests/JobProviderTests/TestJobs.cs b/NzbDrone.Core.Test/ProviderTests/JobProviderTests/TestJobs.cs index efa413ea7..73c19a381 100644 --- a/NzbDrone.Core.Test/ProviderTests/JobProviderTests/TestJobs.cs +++ b/NzbDrone.Core.Test/ProviderTests/JobProviderTests/TestJobs.cs @@ -1,6 +1,7 @@ using System; using System.Linq; using System.Threading; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Model.Notification; using NzbDrone.Core.Providers.Jobs; diff --git a/NzbDrone.Core/CentralDispatch.cs b/NzbDrone.Core/CentralDispatch.cs index 8830485e0..5e630f959 100644 --- a/NzbDrone.Core/CentralDispatch.cs +++ b/NzbDrone.Core/CentralDispatch.cs @@ -7,6 +7,7 @@ using NLog; using NzbDrone.Common; using NzbDrone.Core.Datastore; using NzbDrone.Core.Instrumentation; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.ExternalNotification; using NzbDrone.Core.Providers.Indexer; diff --git a/NzbDrone.Core/Providers/Jobs/AppUpdateJob.cs b/NzbDrone.Core/Jobs/AppUpdateJob.cs similarity index 96% rename from NzbDrone.Core/Providers/Jobs/AppUpdateJob.cs rename to NzbDrone.Core/Jobs/AppUpdateJob.cs index d7113969c..201f71500 100644 --- a/NzbDrone.Core/Providers/Jobs/AppUpdateJob.cs +++ b/NzbDrone.Core/Jobs/AppUpdateJob.cs @@ -1,11 +1,14 @@ -using System.Diagnostics; +using System.Linq; +using System.Diagnostics; using System.IO; using NLog; using NzbDrone.Common; using NzbDrone.Core.Model.Notification; +using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Core; +using NzbDrone.Core.Providers.Jobs; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public class AppUpdateJob : IJob { diff --git a/NzbDrone.Core/Providers/Jobs/BacklogSearchJob.cs b/NzbDrone.Core/Jobs/BacklogSearchJob.cs similarity index 96% rename from NzbDrone.Core/Providers/Jobs/BacklogSearchJob.cs rename to NzbDrone.Core/Jobs/BacklogSearchJob.cs index 0c9703538..7d3bb6686 100644 --- a/NzbDrone.Core/Providers/Jobs/BacklogSearchJob.cs +++ b/NzbDrone.Core/Jobs/BacklogSearchJob.cs @@ -2,9 +2,11 @@ using System.Linq; using NLog; using NzbDrone.Core.Model.Notification; +using NzbDrone.Core.Providers; +using NzbDrone.Core.Providers.Jobs; using NzbDrone.Core.Repository; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public class BacklogSearchJob : IJob { diff --git a/NzbDrone.Core/Providers/Jobs/BannerDownloadJob.cs b/NzbDrone.Core/Jobs/BannerDownloadJob.cs similarity index 96% rename from NzbDrone.Core/Providers/Jobs/BannerDownloadJob.cs rename to NzbDrone.Core/Jobs/BannerDownloadJob.cs index 527e07ac0..255ddf26e 100644 --- a/NzbDrone.Core/Providers/Jobs/BannerDownloadJob.cs +++ b/NzbDrone.Core/Jobs/BannerDownloadJob.cs @@ -1,15 +1,16 @@ using System; -using System.Collections.Generic; using System.IO; using System.Linq; using Ninject; using NLog; using NzbDrone.Common; using NzbDrone.Core.Model.Notification; +using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Core; +using NzbDrone.Core.Providers.Jobs; using NzbDrone.Core.Repository; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public class BannerDownloadJob : IJob { diff --git a/NzbDrone.Core/Providers/Jobs/ConvertEpisodeJob.cs b/NzbDrone.Core/Jobs/ConvertEpisodeJob.cs similarity index 93% rename from NzbDrone.Core/Providers/Jobs/ConvertEpisodeJob.cs rename to NzbDrone.Core/Jobs/ConvertEpisodeJob.cs index 5363fc3e9..067b13cd5 100644 --- a/NzbDrone.Core/Providers/Jobs/ConvertEpisodeJob.cs +++ b/NzbDrone.Core/Jobs/ConvertEpisodeJob.cs @@ -1,10 +1,13 @@ -using System; +using System.Linq; +using System; using Ninject; using NLog; using NzbDrone.Core.Model.Notification; +using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Converting; +using NzbDrone.Core.Providers.Jobs; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public class ConvertEpisodeJob : IJob { diff --git a/NzbDrone.Core/Providers/Jobs/DeleteSeriesJob.cs b/NzbDrone.Core/Jobs/DeleteSeriesJob.cs similarity index 91% rename from NzbDrone.Core/Providers/Jobs/DeleteSeriesJob.cs rename to NzbDrone.Core/Jobs/DeleteSeriesJob.cs index 462e3a246..aabccab8c 100644 --- a/NzbDrone.Core/Providers/Jobs/DeleteSeriesJob.cs +++ b/NzbDrone.Core/Jobs/DeleteSeriesJob.cs @@ -1,9 +1,12 @@ -using System; +using System.Linq; +using System; using Ninject; using NLog; using NzbDrone.Core.Model.Notification; +using NzbDrone.Core.Providers; +using NzbDrone.Core.Providers.Jobs; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public class DeleteSeriesJob : IJob { diff --git a/NzbDrone.Core/Providers/Jobs/DiskScanJob.cs b/NzbDrone.Core/Jobs/DiskScanJob.cs similarity index 95% rename from NzbDrone.Core/Providers/Jobs/DiskScanJob.cs rename to NzbDrone.Core/Jobs/DiskScanJob.cs index 2a994ef5f..8c7bac313 100644 --- a/NzbDrone.Core/Providers/Jobs/DiskScanJob.cs +++ b/NzbDrone.Core/Jobs/DiskScanJob.cs @@ -5,9 +5,11 @@ using Ninject; using NLog; using NzbDrone.Core.Helpers; using NzbDrone.Core.Model.Notification; +using NzbDrone.Core.Providers; +using NzbDrone.Core.Providers.Jobs; using NzbDrone.Core.Repository; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public class DiskScanJob : IJob { diff --git a/NzbDrone.Core/Providers/Jobs/EpisodeSearchJob.cs b/NzbDrone.Core/Jobs/EpisodeSearchJob.cs similarity index 84% rename from NzbDrone.Core/Providers/Jobs/EpisodeSearchJob.cs rename to NzbDrone.Core/Jobs/EpisodeSearchJob.cs index 97e2baf24..8fef47942 100644 --- a/NzbDrone.Core/Providers/Jobs/EpisodeSearchJob.cs +++ b/NzbDrone.Core/Jobs/EpisodeSearchJob.cs @@ -1,12 +1,11 @@ -using System; -using System.Collections.Generic; -using NLog; +using System.Linq; +using System; using Ninject; -using NzbDrone.Core.Model; using NzbDrone.Core.Model.Notification; -using NzbDrone.Core.Repository; +using NzbDrone.Core.Providers; +using NzbDrone.Core.Providers.Jobs; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public class EpisodeSearchJob : IJob { diff --git a/NzbDrone.Core/Providers/Jobs/IJob.cs b/NzbDrone.Core/Jobs/IJob.cs similarity index 92% rename from NzbDrone.Core/Providers/Jobs/IJob.cs rename to NzbDrone.Core/Jobs/IJob.cs index 36bfa4763..73a9d7023 100644 --- a/NzbDrone.Core/Providers/Jobs/IJob.cs +++ b/NzbDrone.Core/Jobs/IJob.cs @@ -1,6 +1,7 @@ -using NzbDrone.Core.Model.Notification; +using System.Linq; +using NzbDrone.Core.Model.Notification; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public interface IJob { diff --git a/NzbDrone.Core/Providers/Jobs/ImportNewSeriesJob.cs b/NzbDrone.Core/Jobs/ImportNewSeriesJob.cs similarity index 97% rename from NzbDrone.Core/Providers/Jobs/ImportNewSeriesJob.cs rename to NzbDrone.Core/Jobs/ImportNewSeriesJob.cs index a0f554ad2..4e11c7da3 100644 --- a/NzbDrone.Core/Providers/Jobs/ImportNewSeriesJob.cs +++ b/NzbDrone.Core/Jobs/ImportNewSeriesJob.cs @@ -5,9 +5,10 @@ using System.Linq; using Ninject; using NLog; using NzbDrone.Core.Model.Notification; -using NzbDrone.Core.Repository; +using NzbDrone.Core.Providers; +using NzbDrone.Core.Providers.Jobs; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { /// /// This job processes newly added jobs by downloading their info diff --git a/NzbDrone.Core/Providers/Jobs/JobProvider.cs b/NzbDrone.Core/Jobs/JobProvider.cs similarity index 98% rename from NzbDrone.Core/Providers/Jobs/JobProvider.cs rename to NzbDrone.Core/Jobs/JobProvider.cs index 4ac739a1a..88cb9d51c 100644 --- a/NzbDrone.Core/Providers/Jobs/JobProvider.cs +++ b/NzbDrone.Core/Jobs/JobProvider.cs @@ -1,18 +1,20 @@ -//https://github.com/kayone/NzbDrone/blob/master/NzbDrone.Core/Providers/Jobs/JobProvider.cs +//https://github.com/kayone/NzbDrone/blob/master/NzbDrone.Core/Providers/Jobs/JobProvider.cs + using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Linq; using System.Threading; -using Ninject; using NLog; +using Ninject; using NzbDrone.Core.Model; using NzbDrone.Core.Model.Notification; +using NzbDrone.Core.Providers; using NzbDrone.Core.Repository; using PetaPoco; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { /// /// Provides a background task runner, tasks could be queue either by the scheduler using QueueScheduled() diff --git a/NzbDrone.Core/Providers/Jobs/PostDownloadScanJob.cs b/NzbDrone.Core/Jobs/PostDownloadScanJob.cs similarity index 94% rename from NzbDrone.Core/Providers/Jobs/PostDownloadScanJob.cs rename to NzbDrone.Core/Jobs/PostDownloadScanJob.cs index bf21ac3f9..a4e965624 100644 --- a/NzbDrone.Core/Providers/Jobs/PostDownloadScanJob.cs +++ b/NzbDrone.Core/Jobs/PostDownloadScanJob.cs @@ -1,11 +1,13 @@ -using System; +using System.Linq; +using System; using NLog; using Ninject; using NzbDrone.Common; using NzbDrone.Core.Model.Notification; +using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Core; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public class PostDownloadScanJob : IJob { diff --git a/NzbDrone.Core/Providers/Jobs/RecentBacklogSearchJob.cs b/NzbDrone.Core/Jobs/RecentBacklogSearchJob.cs similarity index 95% rename from NzbDrone.Core/Providers/Jobs/RecentBacklogSearchJob.cs rename to NzbDrone.Core/Jobs/RecentBacklogSearchJob.cs index 9cb0ce204..be399ec08 100644 --- a/NzbDrone.Core/Providers/Jobs/RecentBacklogSearchJob.cs +++ b/NzbDrone.Core/Jobs/RecentBacklogSearchJob.cs @@ -2,8 +2,9 @@ using System.Linq; using NLog; using NzbDrone.Core.Model.Notification; +using NzbDrone.Core.Providers; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public class RecentBacklogSearchJob : IJob { diff --git a/NzbDrone.Core/Providers/Jobs/RenameEpisodeJob.cs b/NzbDrone.Core/Jobs/RenameEpisodeJob.cs similarity index 92% rename from NzbDrone.Core/Providers/Jobs/RenameEpisodeJob.cs rename to NzbDrone.Core/Jobs/RenameEpisodeJob.cs index 4cc3ca156..f998b3e17 100644 --- a/NzbDrone.Core/Providers/Jobs/RenameEpisodeJob.cs +++ b/NzbDrone.Core/Jobs/RenameEpisodeJob.cs @@ -1,10 +1,11 @@ -using System; +using System.Linq; +using System; using Ninject; using NLog; using NzbDrone.Core.Model.Notification; -using NzbDrone.Core.Providers.Core; +using NzbDrone.Core.Providers; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public class RenameEpisodeJob : IJob { diff --git a/NzbDrone.Core/Providers/Jobs/RenameSeasonJob.cs b/NzbDrone.Core/Jobs/RenameSeasonJob.cs similarity index 95% rename from NzbDrone.Core/Providers/Jobs/RenameSeasonJob.cs rename to NzbDrone.Core/Jobs/RenameSeasonJob.cs index df8dd0c30..1aef4544f 100644 --- a/NzbDrone.Core/Providers/Jobs/RenameSeasonJob.cs +++ b/NzbDrone.Core/Jobs/RenameSeasonJob.cs @@ -1,10 +1,11 @@ -using System; -using Ninject; +using System.Linq; +using System; using NLog; +using Ninject; using NzbDrone.Core.Model.Notification; -using NzbDrone.Core.Providers.Core; +using NzbDrone.Core.Providers; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public class RenameSeasonJob : IJob { diff --git a/NzbDrone.Core/Providers/Jobs/RssSyncJob.cs b/NzbDrone.Core/Jobs/RssSyncJob.cs similarity index 97% rename from NzbDrone.Core/Providers/Jobs/RssSyncJob.cs rename to NzbDrone.Core/Jobs/RssSyncJob.cs index c8ea15522..ab3caa327 100644 --- a/NzbDrone.Core/Providers/Jobs/RssSyncJob.cs +++ b/NzbDrone.Core/Jobs/RssSyncJob.cs @@ -5,9 +5,10 @@ using Ninject; using NLog; using NzbDrone.Core.Model; using NzbDrone.Core.Model.Notification; +using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Indexer; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public class RssSyncJob : IJob { diff --git a/NzbDrone.Core/Providers/Jobs/SeasonSearchJob.cs b/NzbDrone.Core/Jobs/SeasonSearchJob.cs similarity index 95% rename from NzbDrone.Core/Providers/Jobs/SeasonSearchJob.cs rename to NzbDrone.Core/Jobs/SeasonSearchJob.cs index 9baea7270..3553320fb 100644 --- a/NzbDrone.Core/Providers/Jobs/SeasonSearchJob.cs +++ b/NzbDrone.Core/Jobs/SeasonSearchJob.cs @@ -1,12 +1,10 @@ using System; -using System.Collections.Generic; using System.Linq; using NLog; -using NzbDrone.Core.Model; using NzbDrone.Core.Model.Notification; -using NzbDrone.Core.Repository; +using NzbDrone.Core.Providers; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public class SeasonSearchJob : IJob { diff --git a/NzbDrone.Core/Providers/Jobs/SeriesSearchJob.cs b/NzbDrone.Core/Jobs/SeriesSearchJob.cs similarity index 91% rename from NzbDrone.Core/Providers/Jobs/SeriesSearchJob.cs rename to NzbDrone.Core/Jobs/SeriesSearchJob.cs index 0debaf775..4bb50df9e 100644 --- a/NzbDrone.Core/Providers/Jobs/SeriesSearchJob.cs +++ b/NzbDrone.Core/Jobs/SeriesSearchJob.cs @@ -1,12 +1,10 @@ using System; -using System.Collections.Generic; using System.Linq; using NLog; -using NzbDrone.Core.Model; using NzbDrone.Core.Model.Notification; -using NzbDrone.Core.Repository; +using NzbDrone.Core.Providers; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public class SeriesSearchJob : IJob { diff --git a/NzbDrone.Core/Providers/Jobs/TrimLogsJob.cs b/NzbDrone.Core/Jobs/TrimLogsJob.cs similarity index 80% rename from NzbDrone.Core/Providers/Jobs/TrimLogsJob.cs rename to NzbDrone.Core/Jobs/TrimLogsJob.cs index 8dedcbcc9..f6207c2e7 100644 --- a/NzbDrone.Core/Providers/Jobs/TrimLogsJob.cs +++ b/NzbDrone.Core/Jobs/TrimLogsJob.cs @@ -1,12 +1,8 @@ -using System.Diagnostics; -using System.IO; -using NLog; -using NzbDrone.Common; +using System.Linq; using NzbDrone.Core.Instrumentation; using NzbDrone.Core.Model.Notification; -using NzbDrone.Core.Providers.Core; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public class TrimLogsJob : IJob { diff --git a/NzbDrone.Core/Providers/Jobs/UpdateInfoJob.cs b/NzbDrone.Core/Jobs/UpdateInfoJob.cs similarity index 97% rename from NzbDrone.Core/Providers/Jobs/UpdateInfoJob.cs rename to NzbDrone.Core/Jobs/UpdateInfoJob.cs index a15761e89..135676a10 100644 --- a/NzbDrone.Core/Providers/Jobs/UpdateInfoJob.cs +++ b/NzbDrone.Core/Jobs/UpdateInfoJob.cs @@ -3,9 +3,10 @@ using System.Linq; using Ninject; using NzbDrone.Core.Helpers; using NzbDrone.Core.Model.Notification; +using NzbDrone.Core.Providers; using NzbDrone.Core.Repository; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { public class UpdateInfoJob : IJob { diff --git a/NzbDrone.Core/Providers/Jobs/UpdateSceneMappingsJob.cs b/NzbDrone.Core/Jobs/UpdateSceneMappingsJob.cs similarity index 79% rename from NzbDrone.Core/Providers/Jobs/UpdateSceneMappingsJob.cs rename to NzbDrone.Core/Jobs/UpdateSceneMappingsJob.cs index b98ab2f2f..e6f3cd9ce 100644 --- a/NzbDrone.Core/Providers/Jobs/UpdateSceneMappingsJob.cs +++ b/NzbDrone.Core/Jobs/UpdateSceneMappingsJob.cs @@ -1,8 +1,10 @@ -using NzbDrone.Core.Model.Notification; +using System.Linq; +using NzbDrone.Core.Model.Notification; +using NzbDrone.Core.Providers; -namespace NzbDrone.Core.Providers.Jobs +namespace NzbDrone.Core.Jobs { - public class UpdateSceneMappingsJob : IJob + public abstract class UpdateSceneMappingsJob : IJob { private readonly SceneMappingProvider _sceneNameMappingProvider; diff --git a/NzbDrone.Core/Model/EpisodeRenameModel.cs b/NzbDrone.Core/Model/EpisodeRenameModel.cs deleted file mode 100644 index 9b262b63b..000000000 --- a/NzbDrone.Core/Model/EpisodeRenameModel.cs +++ /dev/null @@ -1,12 +0,0 @@ -using NzbDrone.Core.Repository; - -namespace NzbDrone.Core.Model -{ - public class EpisodeRenameModel - { - public string SeriesName { get; set; } - public string Folder { get; set; } - public EpisodeFile EpisodeFile { get; set; } - public bool NewDownload { get; set; } - } -} \ No newline at end of file diff --git a/NzbDrone.Core/Model/ExternalNotificationType.cs b/NzbDrone.Core/Model/ExternalNotificationType.cs deleted file mode 100644 index 41a3b5ad8..000000000 --- a/NzbDrone.Core/Model/ExternalNotificationType.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace NzbDrone.Core.Model -{ - public enum ExternalNotificationType - { - Grab = 0, - Download = 1, - Rename = 2 - } -} diff --git a/NzbDrone.Core/Model/SceneNameModel.cs b/NzbDrone.Core/Model/SceneNameModel.cs deleted file mode 100644 index 9a008fa1c..000000000 --- a/NzbDrone.Core/Model/SceneNameModel.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace NzbDrone.Core.Model -{ - public class SceneNameModel - { - public string Name { get; set; } - public int SeriesId { get; set; } - } -} \ No newline at end of file diff --git a/NzbDrone.Core/Model/UpdatePackage.cs b/NzbDrone.Core/Model/UpdatePackage.cs index 14f10a171..00cfde5bd 100644 --- a/NzbDrone.Core/Model/UpdatePackage.cs +++ b/NzbDrone.Core/Model/UpdatePackage.cs @@ -1,7 +1,5 @@ using System; -using System.Collections.Generic; using System.Linq; -using System.Text; namespace NzbDrone.Core.Model { diff --git a/NzbDrone.Core/NzbDrone.Core.csproj b/NzbDrone.Core/NzbDrone.Core.csproj index e3d5c0250..6c6204059 100644 --- a/NzbDrone.Core/NzbDrone.Core.csproj +++ b/NzbDrone.Core/NzbDrone.Core.csproj @@ -223,7 +223,6 @@ - @@ -239,24 +238,25 @@ - - + + + + + - + - - - - - - - + + + + + @@ -279,19 +279,18 @@ - - - - - - - - + + + + + + + - - - + + + @@ -299,11 +298,9 @@ - - @@ -386,6 +383,7 @@ + diff --git a/NzbDrone.Core/Providers/Jobs/RenameSeriesJob.cs b/NzbDrone.Core/Providers/Jobs/RenameSeriesJob.cs index c67b98e4c..9239b3f02 100644 --- a/NzbDrone.Core/Providers/Jobs/RenameSeriesJob.cs +++ b/NzbDrone.Core/Providers/Jobs/RenameSeriesJob.cs @@ -1,8 +1,8 @@ -using System; -using Ninject; +using System; using NLog; +using Ninject; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Model.Notification; -using NzbDrone.Core.Providers.Core; namespace NzbDrone.Core.Providers.Jobs { diff --git a/NzbDrone.Core/WebTimer.cs b/NzbDrone.Core/WebTimer.cs index e865a169d..26459fa93 100644 --- a/NzbDrone.Core/WebTimer.cs +++ b/NzbDrone.Core/WebTimer.cs @@ -2,6 +2,7 @@ using System.Web; using System.Web.Caching; using NLog; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Providers.Jobs; namespace NzbDrone.Core diff --git a/NzbDrone.Test.Common/TestBase.cs b/NzbDrone.Test.Common/TestBase.cs index 306697dda..eac6da623 100644 --- a/NzbDrone.Test.Common/TestBase.cs +++ b/NzbDrone.Test.Common/TestBase.cs @@ -1,6 +1,5 @@ using System.Linq; using System.IO; - using Moq; using NUnit.Framework; using NzbDrone.Common; @@ -9,12 +8,11 @@ using NzbDrone.Test.Common.AutoMoq; namespace NzbDrone.Test.Common { public class TestBase : LoggingTest - // ReSharper disable InconsistentNaming { - protected const string IntegrationTest = "Integration Test"; + protected const string INTEGRATION_TEST = "Integration Test"; - protected AutoMoqer Mocker; + protected AutoMoqer Mocker { get; private set; } protected string VirtualPath { @@ -46,7 +44,7 @@ namespace NzbDrone.Test.Common } - protected virtual void WithStrictMocker() + protected protected void WithStrictMocker() { Mocker = new AutoMoqer(MockBehavior.Strict); } diff --git a/NzbDrone.Web/Controllers/AddSeriesController.cs b/NzbDrone.Web/Controllers/AddSeriesController.cs index 5449da36b..6296a40f8 100644 --- a/NzbDrone.Web/Controllers/AddSeriesController.cs +++ b/NzbDrone.Web/Controllers/AddSeriesController.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Web.Mvc; using NLog; using NzbDrone.Common; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Core; using NzbDrone.Core.Providers.Jobs; diff --git a/NzbDrone.Web/Controllers/CommandController.cs b/NzbDrone.Web/Controllers/CommandController.cs index a4f227e27..f65ff0745 100644 --- a/NzbDrone.Web/Controllers/CommandController.cs +++ b/NzbDrone.Web/Controllers/CommandController.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Web; using System.Web.Mvc; using NLog; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Model; using NzbDrone.Core.Model.Twitter; using NzbDrone.Core.Providers; diff --git a/NzbDrone.Web/Controllers/EpisodeController.cs b/NzbDrone.Web/Controllers/EpisodeController.cs index bd870034d..5e3d7bdd8 100644 --- a/NzbDrone.Web/Controllers/EpisodeController.cs +++ b/NzbDrone.Web/Controllers/EpisodeController.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using System.Web.Mvc; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Core; using NzbDrone.Core.Providers.Jobs; diff --git a/NzbDrone.Web/Controllers/HistoryController.cs b/NzbDrone.Web/Controllers/HistoryController.cs index 64d201ceb..5422fdabb 100644 --- a/NzbDrone.Web/Controllers/HistoryController.cs +++ b/NzbDrone.Web/Controllers/HistoryController.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Web.Mvc; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Model; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Jobs; diff --git a/NzbDrone.Web/Controllers/SeriesController.cs b/NzbDrone.Web/Controllers/SeriesController.cs index b18e1acfa..fa7c1f49f 100644 --- a/NzbDrone.Web/Controllers/SeriesController.cs +++ b/NzbDrone.Web/Controllers/SeriesController.cs @@ -6,6 +6,7 @@ using System.Web.Mvc; using MvcMiniProfiler; using NzbDrone.Core; using NzbDrone.Core.Helpers; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Jobs; using NzbDrone.Core.Repository; diff --git a/NzbDrone.Web/Controllers/SettingsController.cs b/NzbDrone.Web/Controllers/SettingsController.cs index 51c8e3cff..34d17175a 100644 --- a/NzbDrone.Web/Controllers/SettingsController.cs +++ b/NzbDrone.Web/Controllers/SettingsController.cs @@ -52,11 +52,6 @@ namespace NzbDrone.Web.Controllers _seriesProvider = seriesProvider; } - public ActionResult Test() - { - return View(); - } - public JsonResult TestResults(string q) { var results = new List(); @@ -312,10 +307,6 @@ namespace NzbDrone.Web.Controllers return new JsonResult { Data = "ok" }; } - public ActionResult SubMenu() - { - return PartialView(); - } public QualityModel GetUpdatedProfileList() { diff --git a/NzbDrone.Web/Controllers/SharedController.cs b/NzbDrone.Web/Controllers/SharedController.cs index 499ae1b9f..8d00b11b2 100644 --- a/NzbDrone.Web/Controllers/SharedController.cs +++ b/NzbDrone.Web/Controllers/SharedController.cs @@ -1,6 +1,7 @@ using System; using System.Web.Mvc; using NzbDrone.Common; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Jobs; using NzbDrone.Web.Models; diff --git a/NzbDrone.Web/Controllers/SystemController.cs b/NzbDrone.Web/Controllers/SystemController.cs index 569e98a63..4a1aeba0a 100644 --- a/NzbDrone.Web/Controllers/SystemController.cs +++ b/NzbDrone.Web/Controllers/SystemController.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Web.Mvc; using NzbDrone.Common; using NzbDrone.Core.Helpers; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Core; using NzbDrone.Core.Providers.Jobs; diff --git a/NzbDrone.Web/Controllers/UpdateController.cs b/NzbDrone.Web/Controllers/UpdateController.cs index bb9d173d4..8644e185e 100644 --- a/NzbDrone.Web/Controllers/UpdateController.cs +++ b/NzbDrone.Web/Controllers/UpdateController.cs @@ -3,6 +3,7 @@ using System.IO; using System.Linq; using System.Web.Mvc; using NzbDrone.Common; +using NzbDrone.Core.Jobs; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Jobs; using NzbDrone.Web.Models; diff --git a/NzbDrone.Web/Scripts/jquery.validate.unobtrusive.js b/NzbDrone.Web/Scripts/jquery.validate.unobtrusive.js index 67bacc71b..30f0934f5 100644 --- a/NzbDrone.Web/Scripts/jquery.validate.unobtrusive.js +++ b/NzbDrone.Web/Scripts/jquery.validate.unobtrusive.js @@ -1,4 +1,4 @@ -/// +/// /// /*! From b1c1f5e6d6881d9259cfe2eb856c376a95013028 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Thu, 1 Dec 2011 17:37:38 -0800 Subject: [PATCH 2/3] Fixed broken build. --- NzbDrone.Test.Common/TestBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NzbDrone.Test.Common/TestBase.cs b/NzbDrone.Test.Common/TestBase.cs index eac6da623..8c43ca9a5 100644 --- a/NzbDrone.Test.Common/TestBase.cs +++ b/NzbDrone.Test.Common/TestBase.cs @@ -44,7 +44,7 @@ namespace NzbDrone.Test.Common } - protected protected void WithStrictMocker() + protected void WithStrictMocker() { Mocker = new AutoMoqer(MockBehavior.Strict); } From cc60b972fd2a90ccdf8277875b0c63f8972a14e7 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Thu, 1 Dec 2011 17:45:19 -0800 Subject: [PATCH 3/3] Fixed broken test. --- NzbDrone.Core/Jobs/UpdateSceneMappingsJob.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NzbDrone.Core/Jobs/UpdateSceneMappingsJob.cs b/NzbDrone.Core/Jobs/UpdateSceneMappingsJob.cs index e6f3cd9ce..7ccf50164 100644 --- a/NzbDrone.Core/Jobs/UpdateSceneMappingsJob.cs +++ b/NzbDrone.Core/Jobs/UpdateSceneMappingsJob.cs @@ -4,7 +4,7 @@ using NzbDrone.Core.Providers; namespace NzbDrone.Core.Jobs { - public abstract class UpdateSceneMappingsJob : IJob + public class UpdateSceneMappingsJob : IJob { private readonly SceneMappingProvider _sceneNameMappingProvider;