1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-21 23:32:27 +00:00

Improve indexer name for RED

This commit is contained in:
Bogdan 2024-10-02 09:35:45 +03:00
parent 9b063aa291
commit 715274bcc7
6 changed files with 17 additions and 11 deletions

View file

@ -19,7 +19,7 @@ public FileListSettingsValidator()
public class FileListSettings : ITorrentIndexerSettings
{
private static readonly FileListSettingsValidator Validator = new FileListSettingsValidator();
private static readonly FileListSettingsValidator Validator = new ();
public FileListSettings()
{
@ -33,15 +33,15 @@ public FileListSettings()
};
}
[FieldDefinition(0, Label = "Username", Privacy = PrivacyLevel.UserName)]
[FieldDefinition(0, Label = "IndexerSettingsApiUrl", Advanced = true, HelpTextWarning = "IndexerSettingsApiUrlHelpText")]
public string BaseUrl { get; set; }
[FieldDefinition(1, Label = "Username", Privacy = PrivacyLevel.UserName)]
public string Username { get; set; }
[FieldDefinition(1, Label = "Passkey", Privacy = PrivacyLevel.ApiKey)]
[FieldDefinition(2, Label = "Passkey", Privacy = PrivacyLevel.ApiKey)]
public string Passkey { get; set; }
[FieldDefinition(3, Label = "API URL", Advanced = true, HelpText = "Do not change this unless you know what you're doing. Since your API key will be sent to that host.")]
public string BaseUrl { get; set; }
[FieldDefinition(4, Label = "Categories", Type = FieldType.Select, SelectOptions = typeof(FileListCategories), HelpText = "Categories for use in search and feeds")]
public IEnumerable<int> Categories { get; set; }
@ -52,7 +52,7 @@ public FileListSettings()
public int MinimumSeeders { get; set; }
[FieldDefinition(7)]
public SeedCriteriaSettings SeedCriteria { get; set; } = new SeedCriteriaSettings();
public SeedCriteriaSettings SeedCriteria { get; set; } = new ();
[FieldDefinition(8, Type = FieldType.Checkbox, Label = "IndexerSettingsRejectBlocklistedTorrentHashes", HelpText = "IndexerSettingsRejectBlocklistedTorrentHashesHelpText", Advanced = true)]
public bool RejectBlocklistedTorrentHashesWhileGrabbing { get; set; }

View file

@ -68,7 +68,6 @@ public override IEnumerable<ProviderDefinition> DefaultDefinitions
get
{
yield return GetDefinition("Orpheus Network", GetSettings("https://orpheus.network"));
yield return GetDefinition("Not What CD", GetSettings("https://notwhat.cd"));
}
}

View file

@ -11,7 +11,7 @@ namespace NzbDrone.Core.Indexers.Redacted
{
public class Redacted : HttpIndexerBase<RedactedSettings>
{
public override string Name => "Redacted";
public override string Name => "Redacted.ch";
public override DownloadProtocol Protocol => DownloadProtocol.Torrent;
public override bool SupportsRss => true;
public override bool SupportsSearch => true;

View file

@ -55,12 +55,13 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
var id = torrent.TorrentId;
var title = WebUtility.HtmlDecode(GetTitle(result, torrent));
var infoUrl = GetInfoUrl(result.GroupId, id);
var isFreeLeech = torrent.IsFreeLeech || torrent.IsNeutralLeech || torrent.IsFreeload || torrent.IsPersonalFreeLeech;
torrentInfos.Add(new GazelleInfo
{
Guid = infoUrl,
InfoUrl = infoUrl,
DownloadUrl = GetDownloadUrl(id, !torrent.IsFreeLeech && !torrent.IsNeutralLeech && !torrent.IsFreeload && !torrent.IsPersonalFreeLeech),
DownloadUrl = GetDownloadUrl(id, torrent.CanUseToken && !isFreeLeech),
Title = title,
Artist = WebUtility.HtmlDecode(result.Artist),
Album = WebUtility.HtmlDecode(result.GroupName),

View file

@ -20,10 +20,14 @@ public class RedactedSettings : ITorrentIndexerSettings
public RedactedSettings()
{
BaseUrl = "https://redacted.ch";
Categories = new[] { (int)RedactedCategory.Music };
Categories = new[]
{
(int)RedactedCategory.Music
};
MinimumSeeders = IndexerDefaults.MINIMUM_SEEDERS;
}
[FieldDefinition(0, Label = "IndexerSettingsApiUrl", Advanced = true, HelpTextWarning = "IndexerSettingsApiUrlHelpText")]
public string BaseUrl { get; set; }
[FieldDefinition(1, Label = "ApiKey", HelpText = "Generate this in 'Access Settings' in your Redacted profile", Privacy = PrivacyLevel.ApiKey)]

View file

@ -601,6 +601,8 @@
"IndexerSearchCheckNoAvailableIndexersMessage": "All search-capable indexers are temporarily unavailable due to recent indexer errors",
"IndexerSearchCheckNoInteractiveMessage": "No indexers available with Interactive Search enabled, {appName} will not provide any interactive search results",
"IndexerSettings": "Indexer Settings",
"IndexerSettingsApiUrl": "API URL",
"IndexerSettingsApiUrlHelpText": "Do not change this unless you know what you're doing. Since your API key will be sent to that host.",
"IndexerSettingsRejectBlocklistedTorrentHashes": "Reject Blocklisted Torrent Hashes While Grabbing",
"IndexerSettingsRejectBlocklistedTorrentHashesHelpText": "If a torrent is blocked by hash it may not properly be rejected during RSS/Search for some indexers, enabling this will allow it to be rejected after the torrent is grabbed, but before it is sent to the client.",
"IndexerSettingsSeedRatio": "Seed Ratio",