mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-26 23:00:53 +02:00
Fixed: (AnimeBytes) Improve season/episode detection
This commit is contained in:
parent
c8addc0d62
commit
94cc56d0f6
1 changed files with 22 additions and 8 deletions
|
|
@ -333,7 +333,10 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
{
|
||||
var resolutionProperty = properties.FirstOrDefault(RemuxResolutions.ContainsIgnoreCase);
|
||||
|
||||
properties.Add(resolutionProperty.IsNotNullOrWhiteSpace() ? $"{resolutionProperty} Remux" : "Remux");
|
||||
if (resolutionProperty.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
properties.Add($"{resolutionProperty} Remux");
|
||||
}
|
||||
}
|
||||
|
||||
if (properties.Any(p => p.StartsWithIgnoreCase("M2TS")))
|
||||
|
|
@ -379,13 +382,24 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
season = ParseSeasonFromTitles(synonyms);
|
||||
}
|
||||
|
||||
if (episode is > 0)
|
||||
if (season is > 0 || episode is > 0)
|
||||
{
|
||||
releaseInfo = $" - {episode:00}";
|
||||
}
|
||||
else if (_settings.EnableSonarrCompatibility && season is > 0)
|
||||
{
|
||||
releaseInfo = $"S{season:00}";
|
||||
releaseInfo = string.Empty;
|
||||
|
||||
if (_settings.EnableSonarrCompatibility && season is > 0)
|
||||
{
|
||||
releaseInfo = $"S{season:00}";
|
||||
|
||||
if (episode is > 0)
|
||||
{
|
||||
releaseInfo += $"E{episode:00}";
|
||||
}
|
||||
}
|
||||
|
||||
if (episode is > 0)
|
||||
{
|
||||
releaseInfo += $" - {episode:00}";
|
||||
}
|
||||
}
|
||||
|
||||
releaseInfo = releaseInfo.Trim();
|
||||
|
|
@ -554,7 +568,7 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
{
|
||||
var advancedSeasonRegex = new Regex(@"(\d+)(st|nd|rd|th) Season", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
var seasonCharactersRegex = new Regex(@"(I{2,})$", RegexOptions.Compiled);
|
||||
var seasonNumberRegex = new Regex(@"([2-9])$", RegexOptions.Compiled);
|
||||
var seasonNumberRegex = new Regex(@"\b([2-9])$", RegexOptions.Compiled);
|
||||
|
||||
foreach (var title in titles)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue