Fixed: Manual Search on Works with Auto Search is Enabled

pull/2/head
Qstick 5 years ago
parent 242d530bb4
commit a6eb89e24b

@ -88,7 +88,7 @@ namespace NzbDrone.Api.Indexers
{
try
{
var decisions = _nzbSearchService.MovieSearch(movieId, true);
var decisions = _nzbSearchService.MovieSearch(movieId, true, true);
var prioritizedDecisions = _prioritizeDownloadDecision.PrioritizeDecisionsForMovies(decisions);
return MapDecisions(prioritizedDecisions);

@ -49,7 +49,7 @@ namespace NzbDrone.Core.IndexerSearch
continue;
}
var decisions = _nzbSearchService.MovieSearch(movieId, false);//_nzbSearchService.SeasonSearch(message.MovieId, season.SeasonNumber, false, message.Trigger == CommandTrigger.Manual);
var decisions = _nzbSearchService.MovieSearch(movieId, false, false);//_nzbSearchService.SeasonSearch(message.MovieId, season.SeasonNumber, false, message.Trigger == CommandTrigger.Manual);
downloadedCount += _processDownloadDecisions.ProcessDecisions(decisions).Grabbed.Count;
}
@ -109,7 +109,7 @@ namespace NzbDrone.Core.IndexerSearch
try
{
decisions = _nzbSearchService.MovieSearch(movieId.Key, userInvokedSearch);
decisions = _nzbSearchService.MovieSearch(movieId.Key, userInvokedSearch, false);
}
catch (Exception ex)
{

@ -16,8 +16,8 @@ namespace NzbDrone.Core.IndexerSearch
{
public interface ISearchForNzb
{
List<DownloadDecision> MovieSearch(int movieId, bool userInvokedSearch);
List<DownloadDecision> MovieSearch(Movie movie, bool userInvokedSearch);
List<DownloadDecision> MovieSearch(int movieId, bool userInvokedSearch, bool interactiveSearch);
List<DownloadDecision> MovieSearch(Movie movie, bool userInvokedSearch, bool interactiveSearch);
}
public class NzbSearchService : ISearchForNzb
@ -38,28 +38,28 @@ namespace NzbDrone.Core.IndexerSearch
_logger = logger;
}
public List<DownloadDecision> MovieSearch(int movieId, bool userInvokedSearch)
public List<DownloadDecision> MovieSearch(int movieId, bool userInvokedSearch, bool interactiveSearch)
{
var movie = _movieService.GetMovie(movieId);
return MovieSearch(movie, userInvokedSearch);
return MovieSearch(movie, userInvokedSearch, interactiveSearch);
}
public List<DownloadDecision> MovieSearch(Movie movie, bool userInvokedSearch)
public List<DownloadDecision> MovieSearch(Movie movie, bool userInvokedSearch, bool interactiveSearch)
{
var searchSpec = Get<MovieSearchCriteria>(movie, userInvokedSearch);
var searchSpec = Get<MovieSearchCriteria>(movie, userInvokedSearch, interactiveSearch);
return Dispatch(indexer => indexer.Fetch(searchSpec), searchSpec);
}
private TSpec Get<TSpec>(Movie movie, bool userInvokedSearch) where TSpec : SearchCriteriaBase, new()
private TSpec Get<TSpec>(Movie movie, bool userInvokedSearch, bool interactiveSearch) where TSpec : SearchCriteriaBase, new()
{
var spec = new TSpec()
{
Movie = movie,
UserInvokedSearch = userInvokedSearch
};
UserInvokedSearch = userInvokedSearch,
InteractiveSearch = interactiveSearch
};
return spec;
}

@ -90,7 +90,7 @@ namespace Radarr.Api.V2.Indexers
{
try
{
var decisions = _nzbSearchService.MovieSearch(episodeId, true);
var decisions = _nzbSearchService.MovieSearch(episodeId, true, true);
var prioritizedDecisions = _prioritizeDownloadDecision.PrioritizeDecisionsForMovies(decisions);
return MapDecisions(prioritizedDecisions);

Loading…
Cancel
Save