From a80e9f11f2a816d98e7444a52223709069de85fc Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Mon, 10 Apr 2017 15:54:05 +0200 Subject: [PATCH] Text fixes and got pending releases finally fully working. Fixes #1318 and fixes #1023 --- src/NzbDrone.Api/Queue/QueueActionModule.cs | 2 +- src/NzbDrone.Core/Datastore/TableMapping.cs | 1 + .../RssSync/DelaySpecification.cs | 2 +- .../Download/Pending/PendingReleaseService.cs | 17 +++++++++-------- .../Options/IndexerOptionsViewTemplate.hbs | 4 ++-- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/NzbDrone.Api/Queue/QueueActionModule.cs b/src/NzbDrone.Api/Queue/QueueActionModule.cs index 9882e60e6..33ff98c87 100644 --- a/src/NzbDrone.Api/Queue/QueueActionModule.cs +++ b/src/NzbDrone.Api/Queue/QueueActionModule.cs @@ -105,7 +105,7 @@ namespace NzbDrone.Api.Queue throw new NotFoundException(); } - _downloadService.DownloadReport(pendingRelease.RemoteEpisode); + _downloadService.DownloadReport(pendingRelease.RemoteMovie); return resource.AsResponse(); } diff --git a/src/NzbDrone.Core/Datastore/TableMapping.cs b/src/NzbDrone.Core/Datastore/TableMapping.cs index 28bf15948..839404bf8 100644 --- a/src/NzbDrone.Core/Datastore/TableMapping.cs +++ b/src/NzbDrone.Core/Datastore/TableMapping.cs @@ -159,6 +159,7 @@ namespace NzbDrone.Core.Datastore MapRepository.Instance.RegisterTypeConverter(typeof(List), new EmbeddedDocumentConverter()); MapRepository.Instance.RegisterTypeConverter(typeof(List), new EmbeddedDocumentConverter()); MapRepository.Instance.RegisterTypeConverter(typeof(ParsedEpisodeInfo), new EmbeddedDocumentConverter()); + MapRepository.Instance.RegisterTypeConverter(typeof(ParsedMovieInfo), new EmbeddedDocumentConverter()); MapRepository.Instance.RegisterTypeConverter(typeof(ReleaseInfo), new EmbeddedDocumentConverter()); MapRepository.Instance.RegisterTypeConverter(typeof(HashSet), new EmbeddedDocumentConverter()); MapRepository.Instance.RegisterTypeConverter(typeof(OsPath), new OsPathConverter()); diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/DelaySpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/DelaySpecification.cs index dbb549367..d3df11833 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/DelaySpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/DelaySpecification.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; using NLog; using NzbDrone.Core.Download.Pending; using NzbDrone.Core.IndexerSearch.Definitions; diff --git a/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs b/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs index 1e6c86abf..79cc50fd5 100644 --- a/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs +++ b/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs @@ -218,14 +218,15 @@ namespace NzbDrone.Core.Download.Pending private void Insert(DownloadDecision decision) { - _repository.Insert(new PendingRelease - { - MovieId = decision.RemoteMovie.Movie.Id, - ParsedMovieInfo = decision.RemoteMovie.ParsedMovieInfo, - Release = decision.RemoteMovie.Release, - Title = decision.RemoteMovie.Release.Title, - Added = DateTime.UtcNow - }); + var release = new PendingRelease + { + MovieId = decision.RemoteMovie.Movie.Id, + ParsedMovieInfo = decision.RemoteMovie.ParsedMovieInfo, + Release = decision.RemoteMovie.Release, + Title = decision.RemoteMovie.Release.Title, + Added = DateTime.UtcNow + }; + _repository.Insert(release); _eventAggregator.PublishEvent(new PendingReleasesUpdatedEvent()); } diff --git a/src/UI/Settings/Indexers/Options/IndexerOptionsViewTemplate.hbs b/src/UI/Settings/Indexers/Options/IndexerOptionsViewTemplate.hbs index 575f7174b..b9051b1c7 100644 --- a/src/UI/Settings/Indexers/Options/IndexerOptionsViewTemplate.hbs +++ b/src/UI/Settings/Indexers/Options/IndexerOptionsViewTemplate.hbs @@ -39,9 +39,9 @@
- +
- +