1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-30 20:05:41 +00:00

Fixed: Manual Search on Works with Auto Search is Enabled

This commit is contained in:
Qstick 2019-07-15 22:41:43 -04:00
parent 242d530bb4
commit a6eb89e24b
4 changed files with 14 additions and 14 deletions

View file

@ -88,7 +88,7 @@ private List<ReleaseResource> GetMovieReleases(int movieId)
{
try
{
var decisions = _nzbSearchService.MovieSearch(movieId, true);
var decisions = _nzbSearchService.MovieSearch(movieId, true, true);
var prioritizedDecisions = _prioritizeDownloadDecision.PrioritizeDecisionsForMovies(decisions);
return MapDecisions(prioritizedDecisions);

View file

@ -49,7 +49,7 @@ public void Execute(MoviesSearchCommand message)
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 @@ private void SearchForMissingMovies(List<Movie> movies, bool userInvokedSearch)
try
{
decisions = _nzbSearchService.MovieSearch(movieId.Key, userInvokedSearch);
decisions = _nzbSearchService.MovieSearch(movieId.Key, userInvokedSearch, false);
}
catch (Exception ex)
{

View file

@ -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 @@ public NzbSearchService(IIndexerFactory indexerFactory,
_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;
}

View file

@ -90,7 +90,7 @@ private List<ReleaseResource> GetMovieReleases(int episodeId)
{
try
{
var decisions = _nzbSearchService.MovieSearch(episodeId, true);
var decisions = _nzbSearchService.MovieSearch(episodeId, true, true);
var prioritizedDecisions = _prioritizeDownloadDecision.PrioritizeDecisionsForMovies(decisions);
return MapDecisions(prioritizedDecisions);