mirror of
https://github.com/Readarr/Readarr
synced 2025-12-27 02:32:27 +01:00
Fixed: Skip parsing releases without title
(cherry picked from commit c7824bb593291634bf14a5f7aa689666969b03bf)
This commit is contained in:
parent
419f790d66
commit
ca0c95a2d2
3 changed files with 16 additions and 3 deletions
|
|
@ -162,7 +162,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;
|
||||
|
|
|
|||
|
|
@ -257,9 +257,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,12 @@ public class QualityParser
|
|||
|
||||
public static QualityModel ParseQuality(string name, string desc = null, List<int> categories = null)
|
||||
{
|
||||
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 };
|
||||
}
|
||||
|
||||
var normalizedName = name.Replace('_', ' ').Trim().ToLower();
|
||||
var result = ParseQualityModifiers(name, normalizedName);
|
||||
|
|
|
|||
Loading…
Reference in a new issue