Fixed: (API) Prevent search failed exception when using non-interactive search

This commit is contained in:
Bogdan 2023-07-12 04:40:17 +03:00
parent a5b5e7a3a5
commit c9b1d0d958

View file

@ -165,7 +165,7 @@ private async Task<IList<ReleaseInfo>> Dispatch(Func<IIndexer, Task<IndexerPagea
(criteriaBase.IndexerIds.Contains(-2) && i.Protocol == DownloadProtocol.Torrent))
.ToList();
if (indexers.Count == 0)
if (criteriaBase.InteractiveSearch && indexers.Count == 0)
{
_logger.Debug("Search failed due to all selected indexers being unavailable: {0}", string.Join(", ", criteriaBase.IndexerIds));