mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02:00
Fixed: Manual Search on Works with Auto Search is Enabled
This commit is contained in:
parent
242d530bb4
commit
a6eb89e24b
@ -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);
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user