mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-05-08 21:14:30 +02:00
Fixed: (AnimeBytes) Handle series synonyms with commas (#984)
Fixed: (AnimeBytes) Avoid repeating synonyms on key "3"
This commit is contained in:
parent
bb9969feb5
commit
5207527716
1 changed files with 29 additions and 3 deletions
|
|
@ -228,11 +228,37 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
|
||||
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 @@ public AnimeBytesSettings()
|
|||
[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…
Reference in a new issue