mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-27 22:57:09 -04:00
New: Use languages from Torznab/Newznab attributes if given
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
@@ -12,6 +12,7 @@ using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Common.Instrumentation;
|
||||
using NzbDrone.Core.Indexers.Exceptions;
|
||||
using NzbDrone.Core.Languages;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
namespace NzbDrone.Core.Indexers
|
||||
@@ -160,6 +161,7 @@ namespace NzbDrone.Core.Indexers
|
||||
releaseInfo.DownloadUrl = GetDownloadUrl(item);
|
||||
releaseInfo.InfoUrl = GetInfoUrl(item);
|
||||
releaseInfo.CommentUrl = GetCommentUrl(item);
|
||||
releaseInfo.Languages = GetLanguages(item);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -226,6 +228,11 @@ namespace NzbDrone.Core.Indexers
|
||||
return ParseUrl((string)item.Element("comments"));
|
||||
}
|
||||
|
||||
protected virtual List<Language> GetLanguages(XElement item)
|
||||
{
|
||||
return new List<Language>();
|
||||
}
|
||||
|
||||
protected virtual long GetSize(XElement item)
|
||||
{
|
||||
if (UseEnclosureLength)
|
||||
|
||||
Reference in New Issue
Block a user