mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-06 08:34:28 +01:00
Fixed:(RuTracker) fix for Anime S01nd Episode N of N or N+N of N+N
Based on Jackett 5b712189fc55470dc94b56ea0d764e123e2dc432
This commit is contained in:
parent
f7f3648dac
commit
775b716c0f
1 changed files with 5 additions and 1 deletions
|
|
@ -1541,7 +1541,7 @@ private IEnumerable<IndexerRequest> GetPagedRequests(string term, string[] track
|
||||||
|
|
||||||
if (season != 0)
|
if (season != 0)
|
||||||
{
|
{
|
||||||
searchString += " Сезон: " + season;
|
searchString += " ТВ | Сезон: " + season;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameters.Set("nm", searchString);
|
parameters.Set("nm", searchString);
|
||||||
|
|
@ -1712,6 +1712,8 @@ public class RuTrackerTitleParser
|
||||||
private readonly Regex _tvTitleRusSeasonRegex = new(@"Сезон\s*[:]*\s+(\d+(?:-\d+)?)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
private readonly Regex _tvTitleRusSeasonRegex = new(@"Сезон\s*[:]*\s+(\d+(?:-\d+)?)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
private readonly Regex _tvTitleRusEpisodeOfRegex = new(@"(?:Серии|Эпизод|Выпуски)+\s*[:]*\s+(\d+(?:-\d+)?)\s*из\s*([\w?])", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
private readonly Regex _tvTitleRusEpisodeOfRegex = new(@"(?:Серии|Эпизод|Выпуски)+\s*[:]*\s+(\d+(?:-\d+)?)\s*из\s*([\w?])", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
private readonly Regex _tvTitleRusEpisodeRegex = new(@"(?:Серии|Эпизод|Выпуски)+\s*[:]*\s+(\d+(?:-\d+)?)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
private readonly Regex _tvTitleRusEpisodeRegex = new(@"(?:Серии|Эпизод|Выпуски)+\s*[:]*\s+(\d+(?:-\d+)?)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
private readonly Regex _tvTitleRusSeasonAnimeRegex = new(@"ТВ[-]*(?:(\d+))", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
private readonly Regex _tvTitleRusEpisodeAnimeOfRegex = new(@"\[(\d+(\+\d+)?)\s+из\s+(\d+(\+\d+)?)\]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
public string Parse(string title,
|
public string Parse(string title,
|
||||||
ICollection<IndexerCategory> categories,
|
ICollection<IndexerCategory> categories,
|
||||||
|
|
@ -1736,6 +1738,8 @@ public string Parse(string title,
|
||||||
title = _tvTitleRusSeasonRegex.Replace(title, "S$1");
|
title = _tvTitleRusSeasonRegex.Replace(title, "S$1");
|
||||||
title = _tvTitleRusEpisodeOfRegex.Replace(title, "E$1 of $2");
|
title = _tvTitleRusEpisodeOfRegex.Replace(title, "E$1 of $2");
|
||||||
title = _tvTitleRusEpisodeRegex.Replace(title, "E$1");
|
title = _tvTitleRusEpisodeRegex.Replace(title, "E$1");
|
||||||
|
title = _tvTitleRusSeasonAnimeRegex.Replace(title, "S$1");
|
||||||
|
title = _tvTitleRusEpisodeAnimeOfRegex.Replace(title, "E$1 of $3");
|
||||||
}
|
}
|
||||||
else if (IsAnyMovieCategory(categories))
|
else if (IsAnyMovieCategory(categories))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue