mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-16 01:40:47 +02:00
Fixed: (AnimeBytes) Parse M2TS property as BR-DISK
This commit is contained in:
parent
65d6d518d7
commit
b1add3f649
1 changed files with 11 additions and 5 deletions
|
|
@ -325,13 +325,19 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
// MST with additional 5 hours per GB
|
||||
var minimumSeedTime = 259200 + (int)(size / (int)Math.Pow(1024, 3) * 18000);
|
||||
|
||||
var properties = WebUtility.HtmlDecode(torrent.Property)
|
||||
var propertyList = WebUtility.HtmlDecode(torrent.Property)
|
||||
.Split('|', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries)
|
||||
.ToList();
|
||||
|
||||
properties.RemoveAll(p => _excludedProperties.Any(p.ContainsIgnoreCase));
|
||||
propertyList.RemoveAll(p => _excludedProperties.Any(p.ContainsIgnoreCase));
|
||||
var properties = propertyList.ToHashSet();
|
||||
|
||||
if (_settings.ExcludeRaw && properties.Any(p => p.StartsWithIgnoreCase("RAW")))
|
||||
if (propertyList.Any(p => p.StartsWithIgnoreCase("M2TS")))
|
||||
{
|
||||
properties.Add("BR-DISK");
|
||||
}
|
||||
|
||||
if (_settings.ExcludeRaw && properties.Any(p => p.StartsWithIgnoreCase("RAW") || p.Contains("BR-DISK")))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
@ -457,9 +463,9 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
}
|
||||
|
||||
// We don't actually have a release name >.> so try to create one
|
||||
var releaseGroup = properties.LastOrDefault(p => _commonReleaseGroupsProperties.Any(p.StartsWithIgnoreCase));
|
||||
var releaseGroup = properties.LastOrDefault(p => _commonReleaseGroupsProperties.Any(p.StartsWithIgnoreCase) && p.Contains('(') && p.Contains(')'));
|
||||
|
||||
if (releaseGroup.IsNotNullOrWhiteSpace() && releaseGroup.Contains('(') && releaseGroup.Contains(')'))
|
||||
if (releaseGroup.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
var start = releaseGroup.IndexOf("(", StringComparison.Ordinal);
|
||||
releaseGroup = "[" + releaseGroup.Substring(start + 1, releaseGroup.IndexOf(")", StringComparison.Ordinal) - 1 - start) + "] ";
|
||||
|
|
|
|||
Loading…
Reference in a new issue