mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-20 22:14:34 -04:00
New: (AudioBookBay) Migrate to C#
This commit is contained in:
@@ -31,11 +31,12 @@ namespace NzbDrone.Core.IndexerVersions
|
||||
private const string DEFINITION_BRANCH = "master";
|
||||
private const int DEFINITION_VERSION = 8;
|
||||
|
||||
//Used when moving yml to C#
|
||||
private readonly List<string> _defintionBlocklist = new List<string>()
|
||||
// Used when moving yml to C#
|
||||
private readonly List<string> _definitionBlocklist = new ()
|
||||
{
|
||||
"aither",
|
||||
"animeworld",
|
||||
"audiobookbay",
|
||||
"beyond-hd-oneurl",
|
||||
"beyond-hd",
|
||||
"blutopia",
|
||||
@@ -89,7 +90,7 @@ namespace NzbDrone.Core.IndexerVersions
|
||||
{
|
||||
var request = new HttpRequest($"https://indexers.prowlarr.com/{DEFINITION_BRANCH}/{DEFINITION_VERSION}");
|
||||
var response = _httpClient.Get<List<CardigannMetaDefinition>>(request);
|
||||
indexerList = response.Resource.Where(i => !_defintionBlocklist.Contains(i.File)).ToList();
|
||||
indexerList = response.Resource.Where(i => !_definitionBlocklist.Contains(i.File)).ToList();
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -125,7 +126,7 @@ namespace NzbDrone.Core.IndexerVersions
|
||||
|
||||
public List<string> GetBlocklist()
|
||||
{
|
||||
return _defintionBlocklist;
|
||||
return _definitionBlocklist;
|
||||
}
|
||||
|
||||
private List<CardigannMetaDefinition> ReadDefinitionsFromDisk(List<CardigannMetaDefinition> defs, string path, SearchOption options = SearchOption.TopDirectoryOnly)
|
||||
@@ -227,10 +228,10 @@ namespace NzbDrone.Core.IndexerVersions
|
||||
if (definition.Settings == null)
|
||||
{
|
||||
definition.Settings = new List<SettingsField>
|
||||
{
|
||||
new SettingsField { Name = "username", Label = "Username", Type = "text" },
|
||||
new SettingsField { Name = "password", Label = "Password", Type = "password" }
|
||||
};
|
||||
{
|
||||
new () { Name = "username", Label = "Username", Type = "text" },
|
||||
new () { Name = "password", Label = "Password", Type = "password" }
|
||||
};
|
||||
}
|
||||
|
||||
if (definition.Encoding == null)
|
||||
|
||||
Reference in New Issue
Block a user