Fix spelling "Use languages from Torznab/Newznab attributes if given"

This commit is contained in:
Bogdan 2023-05-21 19:05:18 +03:00 committed by GitHub
parent 90a9ecbaac
commit de3bfb7c5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 12 deletions

View File

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

View File

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

View File

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

View File

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