diff --git a/src/NzbDrone.Core/Download/Clients/Tribler/TriblerDownloadClient.cs b/src/NzbDrone.Core/Download/Clients/Tribler/TriblerDownloadClient.cs index fe8e54241..5ecdc4b49 100644 --- a/src/NzbDrone.Core/Download/Clients/Tribler/TriblerDownloadClient.cs +++ b/src/NzbDrone.Core/Download/Clients/Tribler/TriblerDownloadClient.cs @@ -302,16 +302,13 @@ namespace NzbDrone.Core.Download.Clients.Tribler { _logger.Error(ex, ex.Message); - return new NzbDroneValidationFailure("ApiKey", "Authentication failure") - { - DetailedDescription = string.Format("Please verify your ApiKey is correct. Also verify if the host running Sonarr isn't blocked from accessing {0} by WhiteList limitations in the {0} configuration.", Name) - }; + return new ValidationFailure("APIKey", _localizationService.GetLocalizedString("DownloadClientValidationApiKeyIncorrect")); } catch (DownloadClientUnavailableException ex) { _logger.Error(ex, ex.Message); - return new NzbDroneValidationFailure("Url", "Unable to connect to Tribler") + return new NzbDroneValidationFailure("Host", _localizationService.GetLocalizedString("DownloadClientValidationUnableToConnect", new Dictionary { { "clientName", Name } })) { DetailedDescription = ex.Message }; @@ -320,7 +317,7 @@ namespace NzbDrone.Core.Download.Clients.Tribler { _logger.Error(ex, "Failed to test"); - return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message); + return new NzbDroneValidationFailure(string.Empty, _localizationService.GetLocalizedString("DownloadClientValidationUnknownException", new Dictionary { { "exception", ex.Message } })); } } } diff --git a/src/NzbDrone.Core/Download/Clients/Tribler/TriblerDownloadSettings.cs b/src/NzbDrone.Core/Download/Clients/Tribler/TriblerDownloadSettings.cs index 7bfea43e4..cb9405112 100644 --- a/src/NzbDrone.Core/Download/Clients/Tribler/TriblerDownloadSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/Tribler/TriblerDownloadSettings.cs @@ -24,7 +24,7 @@ namespace NzbDrone.Core.Download.Clients.Tribler .When(c => c.TvDirectory.IsNotNullOrWhiteSpace()) .WithMessage("Cannot use Category and Directory"); - RuleFor(c => c.AnonymityLevel).GreaterThanOrEqualTo(0).WithMessage("Should be greater than or equal to zero"); + RuleFor(c => c.AnonymityLevel).GreaterThanOrEqualTo(0); } } @@ -67,6 +67,7 @@ namespace NzbDrone.Core.Download.Clients.Tribler public string TvDirectory { get; set; } [FieldDefinition(8, Label = "DownloadClientTriblerSettingsAnonymityLevel", Type = FieldType.Number, HelpText = "DownloadClientTriblerSettingsAnonymityLevelHelpText")] + [FieldToken(TokenField.HelpText, "DownloadClientTriblerSettingsAnonymityLevel", "url", "https://www.tribler.org/anonymity.html")] public int AnonymityLevel { get; set; } [FieldDefinition(9, Label = "DownloadClientTriblerSettingsSafeSeeding", Type = FieldType.Checkbox, HelpText = "DownloadClientTriblerSettingsSafeSeedingHelpText")] diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index ec953721c..60bce7cc5 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -535,11 +535,11 @@ "DownloadClientTransmissionSettingsDirectoryHelpText": "Optional location to put downloads in, leave blank to use the default Transmission location", "DownloadClientTransmissionSettingsUrlBaseHelpText": "Adds a prefix to the {clientName} rpc url, eg {url}, defaults to '{defaultUrl}'", "DownloadClientTriblerSettingsAnonymityLevel": "Anonymity level", - "DownloadClientTriblerSettingsAnonymityLevelHelpText": "Number of proxies to use when downloading content. To disable set to 0. Proxies reduce download/upload speed. See https://www.tribler.org/anonymity.html", - "DownloadClientTriblerSettingsApiKeyHelpText": "Api key, found in %APPDATA%\\Roaming\\.Tribler\\7.14\\triblerd.conf, the api key is [api].key, NOT [http_api].key", + "DownloadClientTriblerSettingsAnonymityLevelHelpText": "Number of proxies to use when downloading content. To disable set to 0. Proxies reduce download/upload speed. See {url}", + "DownloadClientTriblerSettingsApiKeyHelpText": "[api].key from triblerd.conf", "DownloadClientTriblerSettingsDirectoryHelpText": "Optional location to put downloads in, leave blank to use the default Tribler location", "DownloadClientTriblerSettingsSafeSeeding": "Safe Seeding", - "DownloadClientTriblerSettingsSafeSeedingHelpText": "If seeding only should be done through proxies. The Anonymity level defines the number of proxies used. See https://www.tribler.org/anonymity.html", + "DownloadClientTriblerSettingsSafeSeedingHelpText": "Only Seed through proxies.", "DownloadClientUTorrentTorrentStateError": "uTorrent is reporting an error", "DownloadClientValidationApiKeyIncorrect": "API Key Incorrect", "DownloadClientValidationApiKeyRequired": "API Key Required",