This conditional makes more sense.

This commit is contained in:
Devin Buhl 2017-01-13 16:16:31 -05:00
parent 3180e648b4
commit d3bd0c9b69
1 changed files with 9 additions and 2 deletions

View File

@ -78,7 +78,10 @@ namespace NzbDrone.Core.Indexers.TorrentPotato
.Accept(HttpAccept.Json);
requestBuilder.AddQueryParam("passkey", Settings.Passkey);
requestBuilder.AddQueryParam("user", !string.IsNullOrWhiteSpace(Settings.User) ? Settings.User : "");
if (!string.IsNullOrWhiteSpace(Settings.User))
{
requestBuilder.AddQueryParam("user", Settings.User);
}
requestBuilder.AddQueryParam("search", "the");
yield return new IndexerRequest(requestBuilder.Build());
@ -90,7 +93,11 @@ namespace NzbDrone.Core.Indexers.TorrentPotato
.Accept(HttpAccept.Json);
requestBuilder.AddQueryParam("passkey", Settings.Passkey);
requestBuilder.AddQueryParam("user", !string.IsNullOrWhiteSpace(Settings.User) ? Settings.User : "");
if (!string.IsNullOrWhiteSpace(Settings.User))
{
requestBuilder.AddQueryParam("user", Settings.User);
}
if (searchCriteria.Movie.ImdbId.IsNotNullOrWhiteSpace())
{