Fixed: (Avistaz) Empty query failing with error

Fixes #192
This commit is contained in:
Qstick
2021-06-12 15:17:13 -04:00
parent e383036c84
commit 561563b48c
2 changed files with 6 additions and 5 deletions
@@ -24,6 +24,11 @@ namespace NzbDrone.Core.Indexers.Definitions.Avistaz
{
var torrentInfos = new List<TorrentInfo>();
if (indexerResponse.HttpResponse.StatusCode == HttpStatusCode.NotFound)
{
return torrentInfos.ToArray();
}
if (indexerResponse.HttpResponse.StatusCode != HttpStatusCode.OK)
{
throw new IndexerException(indexerResponse, $"Unexpected response status {indexerResponse.HttpResponse.StatusCode} code from API request");