Show releases with issues in the interactive search

This commit is contained in:
Bogdan 2024-04-13 09:48:33 +03:00
parent 9cc150b105
commit a48d6029d9
2 changed files with 13 additions and 2 deletions

View file

@ -467,6 +467,11 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
// Ignore these categories as they'll cause hell with the matcher
// TV Special, DVD Special, BD Special
if (groupName is "TV Special" or "DVD Special" or "BD Special")
{
continue;
}
if (groupName is "TV Series" or "OVA" or "ONA")
{
categories = new List<IndexerCategory> { NewznabStandardCategory.TVAnime };

View file

@ -397,7 +397,7 @@ protected virtual async Task<IndexerPageableQueryResult> FetchReleases(Func<IInd
}
}
releases.AddRange(pagedReleases.Where(IsValidRelease));
releases.AddRange(pagedReleases.Where(r => IsValidRelease(r, searchCriteria.InteractiveSearch)));
}
if (releases.Any())
@ -503,7 +503,7 @@ public override IndexerCapabilities GetCapabilities()
return Capabilities ?? ((IndexerDefinition)Definition).Capabilities;
}
protected virtual bool IsValidRelease(ReleaseInfo release)
protected virtual bool IsValidRelease(ReleaseInfo release, bool interactiveSearch = false)
{
if (release.Title.IsNullOrWhiteSpace())
{
@ -512,6 +512,12 @@ protected virtual bool IsValidRelease(ReleaseInfo release)
return false;
}
if (interactiveSearch)
{
// Show releases with issues in the interactive search
return true;
}
if (release.Size == null)
{
_logger.Warn("Invalid Release: '{0}' from indexer: {1}. No size provided.", release.Title, Definition.Name);