Skip to content

Commit

Permalink
Fixed: Skip parsing releases without title
Browse files Browse the repository at this point in the history
Closes #6030
  • Loading branch information
mynameisbogdan committed Sep 19, 2023
1 parent d8633b9 commit c7824bb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/NzbDrone.Common/Extensions/PathExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public static bool ContainsInvalidPathChars(this string text)
{
if (text.IsNullOrWhiteSpace())
{
throw new ArgumentNullException("text");
throw new ArgumentNullException(nameof(text));
}

return text.IndexOfAny(Path.GetInvalidPathChars()) >= 0;
Expand Down
10 changes: 9 additions & 1 deletion src/NzbDrone.Core/Indexers/HttpIndexerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,17 @@ protected virtual async Task<IList<ReleaseInfo>> FetchReleases(Func<IIndexerRequ

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;
}

Expand Down
7 changes: 6 additions & 1 deletion src/NzbDrone.Core/Parser/QualityParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ public class QualityParser

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();

Expand Down

0 comments on commit c7824bb

Please sign in to comment.