mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
erairaws: append optional subs to title. resolves #13234
This commit is contained in:
@@ -68,6 +68,8 @@ namespace Jackett.Common.Indexers
|
|||||||
new DisplayInfoConfigurationItem("", "<p>Please note that the following stats are not available for this indexer. Default values are used instead. </p><ul><li>Files</li><li>Seeders</li><li>Leechers</li></ul>")
|
new DisplayInfoConfigurationItem("", "<p>Please note that the following stats are not available for this indexer. Default values are used instead. </p><ul><li>Files</li><li>Seeders</li><li>Leechers</li></ul>")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
configData.AddDynamic("include-subs", new BoolConfigurationItem("Enable appending SubTitles to the Title"));
|
||||||
|
|
||||||
// Config item for title detail parsing
|
// Config item for title detail parsing
|
||||||
configData.AddDynamic("title-detail-parsing", new BoolConfigurationItem("Enable Title Detail Parsing"));
|
configData.AddDynamic("title-detail-parsing", new BoolConfigurationItem("Enable Title Detail Parsing"));
|
||||||
configData.AddDynamic(
|
configData.AddDynamic(
|
||||||
@@ -83,6 +85,7 @@ namespace Jackett.Common.Indexers
|
|||||||
|
|
||||||
private string RSSKey => ((StringConfigurationItem)configData.GetDynamic("rssKey")).Value;
|
private string RSSKey => ((StringConfigurationItem)configData.GetDynamic("rssKey")).Value;
|
||||||
private bool IsTitleDetailParsingEnabled => ((BoolConfigurationItem)configData.GetDynamic("title-detail-parsing")).Value;
|
private bool IsTitleDetailParsingEnabled => ((BoolConfigurationItem)configData.GetDynamic("title-detail-parsing")).Value;
|
||||||
|
private bool IsSubsEnabled => ((BoolConfigurationItem)configData.GetDynamic("include-subs")).Value;
|
||||||
|
|
||||||
public string RssFeedUri => SiteLink + RSS_PATH + "&" + RSSKey;
|
public string RssFeedUri => SiteLink + RSS_PATH + "&" + RSSKey;
|
||||||
|
|
||||||
@@ -200,9 +203,14 @@ namespace Jackett.Common.Indexers
|
|||||||
guid = builder.Uri;
|
guid = builder.Uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var subs = "";
|
||||||
|
if (IsSubsEnabled)
|
||||||
|
{
|
||||||
|
subs = string.Concat(" JAPANESE [Subs: ", fi.SubTitles, "]");
|
||||||
|
}
|
||||||
yield return new ReleaseInfo
|
yield return new ReleaseInfo
|
||||||
{
|
{
|
||||||
Title = string.Concat(fi.Title, " - ", fi.Quality),
|
Title = string.Concat(fi.Title, " - ", fi.Quality, subs),
|
||||||
Guid = guid,
|
Guid = guid,
|
||||||
MagnetUri = fi.MagnetLink,
|
MagnetUri = fi.MagnetLink,
|
||||||
InfoHash = fi.InfoHash,
|
InfoHash = fi.InfoHash,
|
||||||
@@ -247,6 +255,7 @@ namespace Jackett.Common.Indexers
|
|||||||
var size = rssItem.SelectSingleNode("erai:size", nsm)?.InnerText;
|
var size = rssItem.SelectSingleNode("erai:size", nsm)?.InnerText;
|
||||||
var description = rssItem.SelectSingleNode("description")?.InnerText;
|
var description = rssItem.SelectSingleNode("description")?.InnerText;
|
||||||
var quality = rssItem.SelectSingleNode("erai:resolution", nsm)?.InnerText;
|
var quality = rssItem.SelectSingleNode("erai:resolution", nsm)?.InnerText;
|
||||||
|
var subs = rssItem.SelectSingleNode("erai:subtitles", nsm)?.InnerText;
|
||||||
|
|
||||||
item = new RssFeedItem
|
item = new RssFeedItem
|
||||||
{
|
{
|
||||||
@@ -256,7 +265,8 @@ namespace Jackett.Common.Indexers
|
|||||||
PublishDate = publishDate,
|
PublishDate = publishDate,
|
||||||
Size = size,
|
Size = size,
|
||||||
Description = description,
|
Description = description,
|
||||||
Quality = quality
|
Quality = quality,
|
||||||
|
SubTitles = subs
|
||||||
};
|
};
|
||||||
return item.IsValid();
|
return item.IsValid();
|
||||||
}
|
}
|
||||||
@@ -280,6 +290,8 @@ namespace Jackett.Common.Indexers
|
|||||||
|
|
||||||
public string Quality { get; private set; }
|
public string Quality { get; private set; }
|
||||||
|
|
||||||
|
public string SubTitles { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check there is enough information to process the item.
|
/// Check there is enough information to process the item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -307,6 +319,7 @@ namespace Jackett.Common.Indexers
|
|||||||
Size = ReleaseInfo.GetBytes(feedItem.Size);
|
Size = ReleaseInfo.GetBytes(feedItem.Size);
|
||||||
DetailsLink = ParseDetailsLink(feedItem.Description);
|
DetailsLink = ParseDetailsLink(feedItem.Description);
|
||||||
InfoHash = feedItem.InfoHash;
|
InfoHash = feedItem.InfoHash;
|
||||||
|
SubTitles = feedItem.SubTitles.Replace("[", " ").Replace("]", " ").ToUpper();
|
||||||
|
|
||||||
if (Uri.TryCreate(feedItem.Link, UriKind.Absolute, out Uri magnetUri))
|
if (Uri.TryCreate(feedItem.Link, UriKind.Absolute, out Uri magnetUri))
|
||||||
MagnetLink = magnetUri;
|
MagnetLink = magnetUri;
|
||||||
@@ -339,6 +352,8 @@ namespace Jackett.Common.Indexers
|
|||||||
|
|
||||||
public string Quality { get; }
|
public string Quality { get; }
|
||||||
|
|
||||||
|
public string SubTitles { get; }
|
||||||
|
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
|
|
||||||
public Uri MagnetLink { get; }
|
public Uri MagnetLink { get; }
|
||||||
|
Reference in New Issue
Block a user