Fixed: Grab from Search page

This commit is contained in:
Qstick
2021-03-09 23:51:58 -05:00
parent b41c911092
commit 6d25b468ce
4 changed files with 23 additions and 14 deletions

View File

@@ -9,6 +9,7 @@ using NzbDrone.Core.IndexerSearch;
using NzbDrone.Core.IndexerSearch.Definitions;
using NzbDrone.Core.Parser.Model;
using Prowlarr.Http;
using Prowlarr.Http.Extensions;
namespace Prowlarr.Api.V1.Search
{
@@ -51,7 +52,8 @@ namespace Prowlarr.Api.V1.Search
{
try
{
var decisions = _nzbSearhService.Search(new NewznabRequest { q = query, source = "Prowlarr", t = "search", cat = string.Join(",", categories) }, indexerIds, true).Releases;
var request = new NewznabRequest { q = query, source = "Prowlarr", t = "search", cat = string.Join(",", categories), server = Request.GetServerUrl() };
var decisions = _nzbSearhService.Search(request, indexerIds, true).Releases;
return MapDecisions(decisions);
}