Fixed: Skip parsing releases without title

Closes #6030
This commit is contained in:
Bogdan 2023-09-19 07:05:28 +03:00 committed by GitHub
parent d8633b9688
commit c7824bb593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 3 deletions

View File

@ -171,7 +171,7 @@ namespace NzbDrone.Common.Extensions
{
if (text.IsNullOrWhiteSpace())
{
throw new ArgumentNullException("text");
throw new ArgumentNullException(nameof(text));
}
return text.IndexOfAny(Path.GetInvalidPathChars()) >= 0;

View File

@ -307,9 +307,17 @@ namespace NzbDrone.Core.Indexers
protected virtual bool IsValidRelease(ReleaseInfo release)
{
if (release.Title.IsNullOrWhiteSpace())
{
_logger.Trace("Invalid Release: '{0}' from indexer: {1}. No title provided.", release.InfoUrl, Definition.Name);
return false;
}
if (release.DownloadUrl.IsNullOrWhiteSpace())
{
_logger.Trace("Invalid Release: '{0}' from indexer: {1}. No Download URL provided.", release.Title, release.Indexer);
_logger.Trace("Invalid Release: '{0}' from indexer: {1}. No Download URL provided.", release.Title, Definition.Name);
return false;
}

View File

@ -67,7 +67,12 @@ namespace NzbDrone.Core.Parser
public static QualityModel ParseQuality(string name)
{
Logger.Debug("Trying to parse quality for {0}", name);
Logger.Debug("Trying to parse quality for '{0}'", name);
if (name.IsNullOrWhiteSpace())
{
return new QualityModel { Quality = Quality.Unknown };
}
name = name.Trim();