New: (PTP) Filter by Golden Popcorn only releases

This commit is contained in:
Bogdan
2024-09-29 12:12:26 +03:00
parent 27ea93090f
commit c017a3cd7e
4 changed files with 11 additions and 1 deletions

View File

@@ -73,6 +73,6 @@ namespace NzbDrone.Core.Indexers.Definitions.PassThePopcorn
public class PassThePopcornFlag : IndexerFlag
{
public static IndexerFlag Golden => new ("golden", "Release follows Golden Popcorn quality rules");
public static IndexerFlag Approved => new ("approved", "Release approved by PTP");
public static IndexerFlag Approved => new ("approved", "Release approved by PTP staff");
}
}

View File

@@ -86,6 +86,11 @@ namespace NzbDrone.Core.Indexers.Definitions.PassThePopcorn
parameters.Set("freetorrent", "1");
}
if (_settings.GoldenPopcornOnly)
{
parameters.Set("scene", "2");
}
var queryCats = _capabilities.Categories
.MapTorznabCapsToTrackers(searchCriteria.Categories)
.Select(int.Parse)

View File

@@ -27,6 +27,9 @@ namespace NzbDrone.Core.Indexers.Definitions.PassThePopcorn
[FieldDefinition(4, Label = "IndexerSettingsFreeleechOnly", HelpText = "IndexerPassThePopcornSettingsFreeleechOnlyHelpText", Type = FieldType.Checkbox)]
public bool FreeleechOnly { get; set; }
[FieldDefinition(5, Label = "IndexerPassThePopcornSettingsGoldenPopcornOnly", HelpText = "IndexerPassThePopcornSettingsGoldenPopcornOnlyHelpText", Type = FieldType.Checkbox, Advanced = true)]
public bool GoldenPopcornOnly { get; set; }
public override NzbDroneValidationResult Validate()
{
return new NzbDroneValidationResult(Validator.Validate(this));

View File

@@ -380,6 +380,8 @@
"IndexerPassThePopcornSettingsApiKeyHelpText": "Site API Key",
"IndexerPassThePopcornSettingsApiUserHelpText": "These settings are found in your PassThePopcorn security settings (Edit Profile > Security).",
"IndexerPassThePopcornSettingsFreeleechOnlyHelpText": "Search freeleech releases only",
"IndexerPassThePopcornSettingsGoldenPopcornOnly": "Golden Popcorn only",
"IndexerPassThePopcornSettingsGoldenPopcornOnlyHelpText": "Search Golden Popcorn releases only",
"IndexerPriority": "Indexer Priority",
"IndexerPriorityHelpText": "Indexer Priority from 1 (Highest) to 50 (Lowest). Default: 25.",
"IndexerProxies": "Indexer Proxies",