Fixed: (AnimeBytes) Handle series synonyms with commas (#984)

Fixed: (AnimeBytes) Avoid repeating synonyms on key "3"
pull/1001/head
Amos (LFlare) Ng 3 years ago committed by GitHub
parent bb9969feb5
commit 5207527716
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -228,11 +228,37 @@ namespace NzbDrone.Core.Indexers.Definitions
if (syn.StringArray != null)
{
synonyms.AddRange(syn.StringArray);
if (syn.StringArray.Count >= 1)
{
synonyms.Add(syn.StringArray[0]);
}
if (syn.StringArray.Count >= 2)
{
synonyms.Add(syn.StringArray[1]);
}
if (syn.StringArray.Count == 3)
{
synonyms.AddRange(syn.StringArray[2].Split(',').Select(t => t.Trim()));
}
}
else
{
synonyms.AddRange(syn.StringMap.Values);
if (syn.StringMap.ContainsKey("0"))
{
synonyms.Add(syn.StringMap["0"]);
}
if (syn.StringMap.ContainsKey("1"))
{
synonyms.Add(syn.StringMap["1"]);
}
if (syn.StringMap.ContainsKey("2"))
{
synonyms.AddRange(syn.StringMap["2"].Split(',').Select(t => t.Trim()));
}
}
}
@ -492,7 +518,7 @@ namespace NzbDrone.Core.Indexers.Definitions
[FieldDefinition(3, Label = "Username", HelpText = "Site Username", Privacy = PrivacyLevel.UserName)]
public string Username { get; set; }
[FieldDefinition(4, Label = "Enable Sonarr Compatibility", Type = FieldType.Checkbox, HelpText = "Makes Prowlarr try to add Season information into Release names, without this Sonarr can't match any Seasons, but it has a lot of false positives as well")]
[FieldDefinition(4, Label = "Enable Sonarr Compatibility", Type = FieldType.Checkbox, HelpText = "Makes Prowlarr try to add Season information into Release names, without this Sonarr can't match any Seasons, but it has a lot of false positives as well")]
public bool EnableSonarrCompatibility { get; set; }
public override NzbDroneValidationResult Validate()

Loading…
Cancel
Save