Fixed: Skip parsing releases without title

(cherry picked from commit c7824bb593291634bf14a5f7aa689666969b03bf)
This commit is contained in:
Bogdan 2023-09-19 07:05:28 +03:00
parent e9e36ae56a
commit 552b8f91d2
3 changed files with 16 additions and 3 deletions

View File

@ -172,7 +172,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

@ -278,9 +278,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

@ -78,7 +78,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();