mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
torznab: add support for languages and subtitles
This commit is contained in:
@@ -253,7 +253,9 @@ namespace Jackett.Common.Indexers.Abstract
|
|||||||
DownloadVolumeFactor = row.Value<double>("download_multiply"),
|
DownloadVolumeFactor = row.Value<double>("download_multiply"),
|
||||||
UploadVolumeFactor = row.Value<double>("upload_multiply"),
|
UploadVolumeFactor = row.Value<double>("upload_multiply"),
|
||||||
MinimumRatio = 1,
|
MinimumRatio = 1,
|
||||||
MinimumSeedTime = 172800 // 48 hours
|
MinimumSeedTime = 172800, // 48 hours
|
||||||
|
Languages = row.Value<JArray>("audio")?.Select(x => x.Value<string>("language")).ToList() ?? new List<string>(),
|
||||||
|
Subs = row.Value<JArray>("subtitle")?.Select(x => x.Value<string>("language")).ToList() ?? new List<string>(),
|
||||||
};
|
};
|
||||||
|
|
||||||
releases.Add(release);
|
releases.Add(release);
|
||||||
|
@@ -26,6 +26,8 @@ namespace Jackett.Common.Models
|
|||||||
public long? TraktId { get; set; }
|
public long? TraktId { get; set; }
|
||||||
public long? DoubanId { get; set; }
|
public long? DoubanId { get; set; }
|
||||||
public ICollection<string> Genres { get; set; }
|
public ICollection<string> Genres { get; set; }
|
||||||
|
public ICollection<string> Languages { get; set; }
|
||||||
|
public ICollection<string> Subs { get; set; }
|
||||||
public long? Year { get; set; }
|
public long? Year { get; set; }
|
||||||
public string Author { get; set; }
|
public string Author { get; set; }
|
||||||
public string BookTitle { get; set; }
|
public string BookTitle { get; set; }
|
||||||
@@ -52,6 +54,8 @@ namespace Jackett.Common.Models
|
|||||||
|
|
||||||
public ReleaseInfo()
|
public ReleaseInfo()
|
||||||
{
|
{
|
||||||
|
Languages = new List<string>();
|
||||||
|
Subs = new List<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ReleaseInfo(ReleaseInfo copyFrom)
|
protected ReleaseInfo(ReleaseInfo copyFrom)
|
||||||
@@ -74,6 +78,8 @@ namespace Jackett.Common.Models
|
|||||||
TraktId = copyFrom.TraktId;
|
TraktId = copyFrom.TraktId;
|
||||||
DoubanId = copyFrom.DoubanId;
|
DoubanId = copyFrom.DoubanId;
|
||||||
Genres = copyFrom.Genres;
|
Genres = copyFrom.Genres;
|
||||||
|
Languages = copyFrom.Languages;
|
||||||
|
Subs = copyFrom.Subs;
|
||||||
Year = copyFrom.Year;
|
Year = copyFrom.Year;
|
||||||
Author = copyFrom.Author;
|
Author = copyFrom.Author;
|
||||||
BookTitle = copyFrom.BookTitle;
|
BookTitle = copyFrom.BookTitle;
|
||||||
|
@@ -103,6 +103,8 @@ namespace Jackett.Common.Models
|
|||||||
GetTorznabElement("traktid", r.TraktId),
|
GetTorznabElement("traktid", r.TraktId),
|
||||||
GetTorznabElement("doubanid", r.DoubanId),
|
GetTorznabElement("doubanid", r.DoubanId),
|
||||||
r.Genres == null ? null : GetTorznabElement("genre", string.Join(", ", r.Genres)),
|
r.Genres == null ? null : GetTorznabElement("genre", string.Join(", ", r.Genres)),
|
||||||
|
r.Languages == null ? null : from c in r.Languages select GetTorznabElement("language", c),
|
||||||
|
r.Subs == null ? null : from c in r.Subs select GetTorznabElement("subs", c),
|
||||||
GetTorznabElement("year", r.Year),
|
GetTorznabElement("year", r.Year),
|
||||||
GetTorznabElement("author", RemoveInvalidXMLChars(r.Author)),
|
GetTorznabElement("author", RemoveInvalidXMLChars(r.Author)),
|
||||||
GetTorznabElement("booktitle", RemoveInvalidXMLChars(r.BookTitle)),
|
GetTorznabElement("booktitle", RemoveInvalidXMLChars(r.BookTitle)),
|
||||||
|
Reference in New Issue
Block a user