mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 22:07:32 -04:00
Fixed: (AnimeBytes) Improve release group detection
This commit is contained in:
parent
12526c1bb3
commit
5f57957462
1 changed files with 11 additions and 3 deletions
|
@ -228,6 +228,14 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||
"Freeleech"
|
||||
};
|
||||
|
||||
private readonly HashSet<string> _commonReleaseGroupsProperties = new (StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
"Softsubs",
|
||||
"Hardsubs",
|
||||
"RAW",
|
||||
"Translated"
|
||||
};
|
||||
|
||||
public AnimeBytesParser(AnimeBytesSettings settings)
|
||||
{
|
||||
_settings = settings;
|
||||
|
@ -321,9 +329,9 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||
.Split('|', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries)
|
||||
.ToList();
|
||||
|
||||
properties.RemoveAll(p => _excludedProperties.Any(p.Contains));
|
||||
properties.RemoveAll(p => _excludedProperties.Any(p.ContainsIgnoreCase));
|
||||
|
||||
if (_settings.ExcludeRaw && properties.ContainsIgnoreCase("RAW"))
|
||||
if (_settings.ExcludeRaw && properties.Any(p => p.StartsWithIgnoreCase("RAW")))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -449,7 +457,7 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||
}
|
||||
|
||||
// We don't actually have a release name >.> so try to create one
|
||||
var releaseGroup = properties.LastOrDefault(p => !p.ContainsIgnoreCase("Hentai"));
|
||||
var releaseGroup = properties.LastOrDefault(p => _commonReleaseGroupsProperties.Any(p.StartsWithIgnoreCase));
|
||||
|
||||
if (releaseGroup.IsNotNullOrWhiteSpace() && releaseGroup.Contains('(') && releaseGroup.Contains(')'))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue