1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-20 18:02:44 +01:00

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

View File

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

View File

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