mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-17 21:44:48 -04:00
Compare commits
7 Commits
v1.25.0.47
...
v1.25.1.47
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d16b88185 | ||
|
|
121ef8e80d | ||
|
|
d53fec7e75 | ||
|
|
c017a3cd7e | ||
|
|
27ea93090f | ||
|
|
d79845144e | ||
|
|
3f77900dd0 |
@@ -9,7 +9,7 @@ variables:
|
||||
testsFolder: './_tests'
|
||||
yarnCacheFolder: $(Pipeline.Workspace)/.yarn
|
||||
nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages
|
||||
majorVersion: '1.25.0'
|
||||
majorVersion: '1.25.1'
|
||||
minorVersion: $[counter('minorVersion', 1)]
|
||||
prowlarrVersion: '$(majorVersion).$(minorVersion)'
|
||||
buildName: '$(Build.SourceBranchName).$(prowlarrVersion)'
|
||||
|
||||
@@ -27,16 +27,16 @@ namespace NzbDrone.Core.Indexers.Definitions.Avistaz
|
||||
|
||||
public string Token { get; set; }
|
||||
|
||||
[FieldDefinition(2, Label = "Username", HelpText = "Site Username", Privacy = PrivacyLevel.UserName)]
|
||||
[FieldDefinition(2, Label = "Username", HelpText = "IndexerAvistazSettingsUsernameHelpText", HelpTextWarning = "IndexerAvistazSettingsUsernameHelpTextWarning", Privacy = PrivacyLevel.UserName)]
|
||||
public string Username { get; set; }
|
||||
|
||||
[FieldDefinition(3, Label = "Password", HelpText = "Site Password", Privacy = PrivacyLevel.Password, Type = FieldType.Password)]
|
||||
[FieldDefinition(3, Label = "Password", HelpText = "IndexerAvistazSettingsPasswordHelpText", Privacy = PrivacyLevel.Password, Type = FieldType.Password)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[FieldDefinition(4, Label = "PID", HelpText = "PID from My Account or My Profile page", Privacy = PrivacyLevel.Password, Type = FieldType.Password)]
|
||||
[FieldDefinition(4, Label = "PID", HelpText = "IndexerAvistazSettingsPidHelpText", Privacy = PrivacyLevel.Password, Type = FieldType.Password)]
|
||||
public string Pid { get; set; }
|
||||
|
||||
[FieldDefinition(5, Label = "Freeleech Only", Type = FieldType.Checkbox, HelpText = "Search freeleech only")]
|
||||
[FieldDefinition(5, Label = "IndexerSettingsFreeleechOnly", Type = FieldType.Checkbox, HelpText = "IndexerAvistazSettingsFreeleechOnlyHelpText")]
|
||||
public bool FreeleechOnly { get; set; }
|
||||
|
||||
public override NzbDroneValidationResult Validate()
|
||||
|
||||
@@ -103,6 +103,8 @@ public class FileList : TorrentIndexerBase<FileListSettings>
|
||||
caps.Categories.AddCategoryMapping(25, NewznabStandardCategory.Movies3D, "Filme 3D");
|
||||
caps.Categories.AddCategoryMapping(26, NewznabStandardCategory.MoviesBluRay, "Filme 4K Blu-Ray");
|
||||
caps.Categories.AddCategoryMapping(27, NewznabStandardCategory.TVUHD, "Seriale 4K");
|
||||
caps.Categories.AddCategoryMapping(28, NewznabStandardCategory.MoviesForeign, "RO Dubbed");
|
||||
caps.Categories.AddCategoryMapping(28, NewznabStandardCategory.TVForeign, "RO Dubbed");
|
||||
|
||||
return caps;
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ public class FileListRequestGenerator : IIndexerRequestGenerator
|
||||
|
||||
if (searchCriteria.Categories != null && searchCriteria.Categories.Any())
|
||||
{
|
||||
parameters.Set("category", string.Join(",", Capabilities.Categories.MapTorznabCapsToTrackers(searchCriteria.Categories)));
|
||||
parameters.Set("category", string.Join(",", Capabilities.Categories.MapTorznabCapsToTrackers(searchCriteria.Categories).Distinct().ToList()));
|
||||
}
|
||||
|
||||
if (Settings.FreeleechOnly)
|
||||
|
||||
@@ -22,6 +22,7 @@ using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
using NzbDrone.Core.Parser;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
using NzbDrone.Core.ThingiProvider;
|
||||
using NzbDrone.Core.Validation;
|
||||
|
||||
namespace NzbDrone.Core.Indexers.Definitions
|
||||
@@ -51,7 +52,7 @@ namespace NzbDrone.Core.Indexers.Definitions
|
||||
|
||||
public override IParseIndexerResponse GetParser()
|
||||
{
|
||||
return new MyAnonamouseParser(Settings, Capabilities.Categories, _httpClient, _cacheManager, _logger);
|
||||
return new MyAnonamouseParser(Definition, Settings, Capabilities.Categories, _httpClient, _cacheManager, _logger);
|
||||
}
|
||||
|
||||
public override async Task<IndexerDownloadResponse> Download(Uri link)
|
||||
@@ -374,6 +375,7 @@ namespace NzbDrone.Core.Indexers.Definitions
|
||||
|
||||
public class MyAnonamouseParser : IParseIndexerResponse
|
||||
{
|
||||
private readonly ProviderDefinition _definition;
|
||||
private readonly MyAnonamouseSettings _settings;
|
||||
private readonly IndexerCapabilitiesCategories _categories;
|
||||
private readonly IIndexerHttpClient _httpClient;
|
||||
@@ -386,12 +388,14 @@ namespace NzbDrone.Core.Indexers.Definitions
|
||||
"Elite VIP"
|
||||
};
|
||||
|
||||
public MyAnonamouseParser(MyAnonamouseSettings settings,
|
||||
public MyAnonamouseParser(ProviderDefinition definition,
|
||||
MyAnonamouseSettings settings,
|
||||
IndexerCapabilitiesCategories categories,
|
||||
IIndexerHttpClient httpClient,
|
||||
ICacheManager cacheManager,
|
||||
Logger logger)
|
||||
{
|
||||
_definition = definition;
|
||||
_settings = settings;
|
||||
_categories = categories;
|
||||
_httpClient = httpClient;
|
||||
@@ -543,7 +547,7 @@ namespace NzbDrone.Core.Indexers.Definitions
|
||||
|
||||
_logger.Debug("Fetching user data: {0}", request.Url.FullUri);
|
||||
|
||||
var response = _httpClient.Get(request);
|
||||
var response = _httpClient.ExecuteProxied(request, _definition);
|
||||
var jsonResponse = JsonConvert.DeserializeObject<MyAnonamouseUserDataResponse>(response.Content);
|
||||
|
||||
return jsonResponse.UserClass?.Trim();
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -320,6 +320,11 @@
|
||||
"IndexerAlphaRatioSettingsFreeleechOnlyHelpText": "Search freeleech releases only",
|
||||
"IndexerAlreadySetup": "At least one instance of indexer is already setup",
|
||||
"IndexerAuth": "Indexer Auth",
|
||||
"IndexerAvistazSettingsFreeleechOnlyHelpText": "Search freeleech releases only",
|
||||
"IndexerAvistazSettingsPasswordHelpText": "Site Password",
|
||||
"IndexerAvistazSettingsPidHelpText": "PID from My Account or My Profile page",
|
||||
"IndexerAvistazSettingsUsernameHelpText": "Site Username",
|
||||
"IndexerAvistazSettingsUsernameHelpTextWarning": "Only member rank and above can use the API on this indexer.",
|
||||
"IndexerBeyondHDSettingsApiKeyHelpText": "API Key from the Site (Found in My Security => API Key)",
|
||||
"IndexerBeyondHDSettingsFreeleechOnlyHelpText": "Search freeleech releases only",
|
||||
"IndexerBeyondHDSettingsLimitedOnly": "Limited Only",
|
||||
@@ -380,6 +385,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",
|
||||
|
||||
@@ -255,20 +255,25 @@ namespace NzbDrone.Api.V1.Indexers
|
||||
var source = Request.GetSource();
|
||||
var host = Request.GetHostName();
|
||||
|
||||
var unprotectedlLink = _downloadMappingService.ConvertToNormalLink(link);
|
||||
var unprotectedLink = _downloadMappingService.ConvertToNormalLink(link);
|
||||
|
||||
if (unprotectedLink.IsNullOrWhiteSpace())
|
||||
{
|
||||
throw new BadRequestException("Failed to normalize provided link");
|
||||
}
|
||||
|
||||
// If Indexer is set to download via Redirect then just redirect to the link
|
||||
if (indexer.SupportsRedirect && indexerDef.Redirect)
|
||||
{
|
||||
_downloadService.RecordRedirect(unprotectedlLink, id, source, host, file);
|
||||
return RedirectPermanent(unprotectedlLink);
|
||||
_downloadService.RecordRedirect(unprotectedLink, id, source, host, file);
|
||||
return RedirectPermanent(unprotectedLink);
|
||||
}
|
||||
|
||||
byte[] downloadBytes;
|
||||
|
||||
try
|
||||
{
|
||||
downloadBytes = await _downloadService.DownloadReport(unprotectedlLink, id, source, host, file);
|
||||
downloadBytes = await _downloadService.DownloadReport(unprotectedLink, id, source, host, file);
|
||||
}
|
||||
catch (ReleaseUnavailableException ex)
|
||||
{
|
||||
|
||||
@@ -5089,6 +5089,10 @@
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"nullable": true
|
||||
},
|
||||
"preferMagnetUrl": {
|
||||
"type": "boolean",
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
||||
Reference in New Issue
Block a user