mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-05 02:22:31 +01:00
Fixed: Don't NullRef if filter parameters null
This commit is contained in:
parent
3287ce6f90
commit
b73950c1b4
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Extensions;
|
||||
@ -72,11 +72,27 @@ private IEnumerable<NetImportRequest> GetMoviesRequests()
|
||||
.AddQueryParam("certification_country", "US");
|
||||
}
|
||||
|
||||
if (minVoteCount.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
requestBuilder.AddQueryParam("vote_count.gte", minVoteCount);
|
||||
}
|
||||
|
||||
if (minVoteAverage.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
requestBuilder.AddQueryParam("vote_average.gte", minVoteAverage);
|
||||
}
|
||||
|
||||
if (includeGenreIds.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
requestBuilder.AddQueryParam("with_genres", includeGenreIds);
|
||||
}
|
||||
|
||||
if (excludeGenreIds.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
requestBuilder.AddQueryParam("without_genres", excludeGenreIds);
|
||||
}
|
||||
|
||||
requestBuilder
|
||||
.AddQueryParam("vote_count.gte", minVoteCount)
|
||||
.AddQueryParam("vote_average.gte", minVoteAverage)
|
||||
.AddQueryParam("with_genres", includeGenreIds)
|
||||
.AddQueryParam("without_genres", excludeGenreIds)
|
||||
.AddQueryParam("with_original_language", languageCode)
|
||||
.Accept(HttpAccept.Json);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user