Fix spelling "Use languages from Torznab/Newznab attributes if given"
This commit is contained in:
parent
90a9ecbaac
commit
de3bfb7c5a
|
@ -31,7 +31,6 @@ namespace NzbDrone.Core.Download.Aggregation.Aggregators
|
|||
{
|
||||
_logger.Debug("Unable to aggregate languages, using parsed values: {0}", string.Join(", ", languages.ToList()));
|
||||
|
||||
remoteEpisode.Languages = languages;
|
||||
remoteEpisode.Languages = releaseInfo != null && releaseInfo.Languages.Any() ? releaseInfo.Languages : languages;
|
||||
|
||||
return remoteEpisode;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using FluentValidation.Results;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Http;
|
||||
|
@ -16,8 +15,6 @@ namespace NzbDrone.Core.Indexers
|
|||
public abstract class IndexerBase<TSettings> : IIndexer
|
||||
where TSettings : IIndexerSettings, new()
|
||||
{
|
||||
private static readonly Regex MultiRegex = new (@"\b(?<multi>multi)\b", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
protected readonly IIndexerStatusService _indexerStatusService;
|
||||
protected readonly IConfigService _configService;
|
||||
protected readonly IParsingService _parsingService;
|
||||
|
|
|
@ -105,16 +105,16 @@ namespace NzbDrone.Core.Indexers.Newznab
|
|||
|
||||
protected override List<Language> GetLanguages(XElement item)
|
||||
{
|
||||
var languges = TryGetMultipleNewznabAttributes(item, "language");
|
||||
var languages = TryGetMultipleNewznabAttributes(item, "language");
|
||||
var results = new List<Language>();
|
||||
|
||||
// Try to find <language> elements for some indexers that suck at following the rules.
|
||||
if (languges.Count == 0)
|
||||
if (languages.Count == 0)
|
||||
{
|
||||
languges = item.Elements("language").Select(e => e.Value).ToList();
|
||||
languages = item.Elements("language").Select(e => e.Value).ToList();
|
||||
}
|
||||
|
||||
foreach (var language in languges)
|
||||
foreach (var language in languages)
|
||||
{
|
||||
var mappedLanguage = IsoLanguages.FindByName(language)?.Language ?? null;
|
||||
|
||||
|
|
|
@ -96,16 +96,16 @@ namespace NzbDrone.Core.Indexers.Torznab
|
|||
|
||||
protected override List<Language> GetLanguages(XElement item)
|
||||
{
|
||||
var languges = TryGetMultipleTorznabAttributes(item, "language");
|
||||
var languages = TryGetMultipleTorznabAttributes(item, "language");
|
||||
var results = new List<Language>();
|
||||
|
||||
// Try to find <language> elements for some indexers that suck at following the rules.
|
||||
if (languges.Count == 0)
|
||||
if (languages.Count == 0)
|
||||
{
|
||||
languges = item.Elements("language").Select(e => e.Value).ToList();
|
||||
languages = item.Elements("language").Select(e => e.Value).ToList();
|
||||
}
|
||||
|
||||
foreach (var language in languges)
|
||||
foreach (var language in languages)
|
||||
{
|
||||
var mappedLanguage = IsoLanguages.FindByName(language)?.Language ?? null;
|
||||
|
||||
|
|
Loading…
Reference in New Issue