mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 05:47:22 -04:00
Fixed: Ignore releases without title
This commit is contained in:
parent
43cb22ff2b
commit
4c8b0c9eec
2 changed files with 14 additions and 2 deletions
|
@ -160,7 +160,7 @@ namespace NzbDrone.Common.Extensions
|
|||
{
|
||||
if (text.IsNullOrWhiteSpace())
|
||||
{
|
||||
throw new ArgumentNullException("text");
|
||||
throw new ArgumentNullException(nameof(text));
|
||||
}
|
||||
|
||||
return text.IndexOfAny(Path.GetInvalidPathChars()) >= 0;
|
||||
|
|
|
@ -363,7 +363,7 @@ namespace NzbDrone.Core.Indexers
|
|||
}
|
||||
}
|
||||
|
||||
releases.AddRange(pagedReleases);
|
||||
releases.AddRange(pagedReleases.Where(IsValidRelease));
|
||||
}
|
||||
|
||||
if (releases.Any())
|
||||
|
@ -469,6 +469,18 @@ namespace NzbDrone.Core.Indexers
|
|||
return Capabilities ?? ((IndexerDefinition)Definition).Capabilities;
|
||||
}
|
||||
|
||||
protected virtual bool IsValidRelease(ReleaseInfo release)
|
||||
{
|
||||
if (release.Title.IsNullOrWhiteSpace())
|
||||
{
|
||||
_logger.Error("Invalid Release: '{0}' from indexer: {1}. No title provided.", release.InfoUrl, Definition.Name);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected virtual bool IsFullPage(IList<ReleaseInfo> page, int pageSize)
|
||||
{
|
||||
return pageSize != 0 && page.Count >= pageSize;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue