diff --git a/src/NzbDrone.Core/HealthCheck/Checks/IndexerVIPCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/IndexerVIPCheck.cs index 4265b5963..2337403b8 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/IndexerVIPCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/IndexerVIPCheck.cs @@ -11,6 +11,7 @@ namespace NzbDrone.Core.HealthCheck.Checks [CheckOn(typeof(ProviderAddedEvent))] [CheckOn(typeof(ProviderUpdatedEvent))] [CheckOn(typeof(ProviderDeletedEvent))] + [CheckOn(typeof(ProviderBulkUpdatedEvent))] [CheckOn(typeof(ProviderBulkDeletedEvent))] public class IndexerVIPCheck : HealthCheckBase { @@ -24,7 +25,7 @@ public IndexerVIPCheck(IIndexerFactory indexerFactory, ILocalizationService loca public override HealthCheck Check() { - var indexers = _indexerFactory.AllProviders(false); + var indexers = _indexerFactory.Enabled(false); var expiringProviders = new List(); foreach (var provider in indexers) @@ -39,12 +40,8 @@ public override HealthCheck Check() var expiration = (string)vipProp.GetValue(provider.Definition.Settings); - if (expiration.IsNullOrWhiteSpace()) - { - continue; - } - - if (DateTime.Parse(expiration).Between(DateTime.Now, DateTime.Now.AddDays(7))) + if (expiration.IsNotNullOrWhiteSpace() && + DateTime.Parse(expiration).Between(DateTime.Now, DateTime.Now.AddDays(7))) { expiringProviders.Add(provider); } @@ -53,10 +50,12 @@ public override HealthCheck Check() if (!expiringProviders.Empty()) { return new HealthCheck(GetType(), - HealthCheckResult.Warning, - string.Format(_localizationService.GetLocalizedString("IndexerVipCheckExpiringClientMessage"), - string.Join(", ", expiringProviders.Select(v => v.Definition.Name))), - "#indexer-vip-expiring"); + HealthCheckResult.Warning, + _localizationService.GetLocalizedString("IndexerVipExpiringHealthCheckMessage", new Dictionary + { + { "indexerNames", string.Join(", ", expiringProviders.Select(v => v.Definition.Name).ToArray()) } + }), + "#indexer-vip-expiring"); } return new HealthCheck(GetType()); diff --git a/src/NzbDrone.Core/HealthCheck/Checks/IndexerVIPExpiredCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/IndexerVIPExpiredCheck.cs index 8b0dd06e7..0f3dffc1e 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/IndexerVIPExpiredCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/IndexerVIPExpiredCheck.cs @@ -11,6 +11,7 @@ namespace NzbDrone.Core.HealthCheck.Checks [CheckOn(typeof(ProviderAddedEvent))] [CheckOn(typeof(ProviderUpdatedEvent))] [CheckOn(typeof(ProviderDeletedEvent))] + [CheckOn(typeof(ProviderBulkUpdatedEvent))] [CheckOn(typeof(ProviderBulkDeletedEvent))] public class IndexerVIPExpiredCheck : HealthCheckBase { @@ -24,7 +25,7 @@ public IndexerVIPExpiredCheck(IIndexerFactory indexerFactory, ILocalizationServi public override HealthCheck Check() { - var indexers = _indexerFactory.AllProviders(false); + var indexers = _indexerFactory.Enabled(false); var expiredProviders = new List(); foreach (var provider in indexers) @@ -39,12 +40,8 @@ public override HealthCheck Check() var expiration = (string)vipProp.GetValue(provider.Definition.Settings); - if (expiration.IsNullOrWhiteSpace()) - { - continue; - } - - if (DateTime.Parse(expiration).Before(DateTime.Now)) + if (expiration.IsNotNullOrWhiteSpace() && + DateTime.Parse(expiration).Before(DateTime.Now)) { expiredProviders.Add(provider); } @@ -53,10 +50,12 @@ public override HealthCheck Check() if (!expiredProviders.Empty()) { return new HealthCheck(GetType(), - HealthCheckResult.Error, - string.Format(_localizationService.GetLocalizedString("IndexerVipCheckExpiredClientMessage"), - string.Join(", ", expiredProviders.Select(v => v.Definition.Name))), - "#indexer-vip-expired"); + HealthCheckResult.Error, + _localizationService.GetLocalizedString("IndexerVipExpiredHealthCheckMessage", new Dictionary + { + { "indexerNames", string.Join(", ", expiredProviders.Select(v => v.Definition.Name).ToArray()) } + }), + "#indexer-vip-expired"); } return new HealthCheck(GetType()); diff --git a/src/NzbDrone.Core/Localization/Core/de.json b/src/NzbDrone.Core/Localization/Core/de.json index 4df25d50e..617ebf858 100644 --- a/src/NzbDrone.Core/Localization/Core/de.json +++ b/src/NzbDrone.Core/Localization/Core/de.json @@ -194,8 +194,8 @@ "IndexerStatusCheckAllClientMessage": "Alle Indexer sind aufgrund von Fehlern nicht verfügbar", "IndexerStatusCheckSingleClientMessage": "Indexer aufgrund von Fehlern nicht verfügbar: {0}", "IndexerTagsHelpText": "Benutze Tags, um Indexer-Proxies zu spezifizieren, mit welchen Apps der Indexer synchronisiert oder um Indexer zu organisieren.", - "IndexerVipCheckExpiredClientMessage": "Die VIP Indexer Vorteile sind abgelaufen: {0}", - "IndexerVipCheckExpiringClientMessage": "Die Indexer VIP Vorteile verfallen bald: {0}", + "IndexerVipExpiredHealthCheckMessage": "Die VIP Indexer Vorteile sind abgelaufen: {indexerNames}", + "IndexerVipExpiringHealthCheckMessage": "Die Indexer VIP Vorteile verfallen bald: {indexerNames}", "Indexers": "Indexer", "Info": "Info", "InstanceName": "Instanzname", diff --git a/src/NzbDrone.Core/Localization/Core/el.json b/src/NzbDrone.Core/Localization/Core/el.json index 02dac92f0..e3ac6b6a3 100644 --- a/src/NzbDrone.Core/Localization/Core/el.json +++ b/src/NzbDrone.Core/Localization/Core/el.json @@ -356,7 +356,7 @@ "Auth": "Auth", "BookSearch": "Αναζήτηση βιβλίου", "FullSync": "Πλήρης συγχρονισμός", - "IndexerVipCheckExpiringClientMessage": "Τα οφέλη VIP του ευρετηρίου λήγουν σύντομα: {0}", + "IndexerVipExpiringHealthCheckMessage": "Τα οφέλη VIP του ευρετηρίου λήγουν σύντομα: {indexerNames}", "NotSupported": "Δεν υποστηρίζεται", "Parameters": "Παράμετροι", "Public": "Δημόσιο", @@ -394,7 +394,7 @@ "IndexerQuery": "Ερώτημα ευρετηρίου", "IndexerSettingsSummary": "Διαμορφώστε διάφορες καθολικές ρυθμίσεις ευρετηρίου, συμπεριλαμβανομένων των διακομιστών μεσολάβησης.", "IndexerSite": "Ιστότοπος ευρετηρίου", - "IndexerVipCheckExpiredClientMessage": "Τα προνόμια VIP του ευρετηρίου έχουν λήξει: {0}", + "IndexerVipExpiredHealthCheckMessage": "Τα προνόμια VIP του ευρετηρίου έχουν λήξει: {indexerNames}", "MappedCategories": "Χαρτογραφημένες κατηγορίες", "MovieSearch": "Αναζήτηση ταινίας", "MovieSearchTypes": "Τύποι αναζήτησης ταινιών", diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index d15b86c2c..24effc8eb 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -415,8 +415,8 @@ "IndexerTagsHelpText": "Use tags to specify Indexer Proxies or which apps the indexer is synced to.", "IndexerTagsHelpTextWarning": "Tags should be used with caution, they can have unintended effects. An indexer with a tag will only sync to apps with the same tag.", "IndexerTorrentSyndikatSettingsApiKeyHelpText": "Site API Key", - "IndexerVipCheckExpiredClientMessage": "Indexer VIP benefits have expired: {0}", - "IndexerVipCheckExpiringClientMessage": "Indexer VIP benefits expiring soon: {0}", + "IndexerVipExpiredHealthCheckMessage": "Indexer VIP benefits have expired: {indexerNames}", + "IndexerVipExpiringHealthCheckMessage": "Indexer VIP benefits expiring soon: {indexerNames}", "Indexers": "Indexers", "Info": "Info", "InitialFailure": "Initial Failure", diff --git a/src/NzbDrone.Core/Localization/Core/es.json b/src/NzbDrone.Core/Localization/Core/es.json index 53be4e31f..a31e5d4df 100644 --- a/src/NzbDrone.Core/Localization/Core/es.json +++ b/src/NzbDrone.Core/Localization/Core/es.json @@ -524,10 +524,10 @@ "IndexerRss": "RSS del Indexador", "IndexerSettingsSummary": "Configurar varios ajustes globales del Indexador, incluyendo Proxies.", "IndexerName": "Nombre del Indexador", - "IndexerVipCheckExpiringClientMessage": "Las ventajas VIP de los indexadores expiran pronto: {0}", + "IndexerVipExpiringHealthCheckMessage": "Las ventajas VIP de los indexadores expiran pronto: {indexerNames}", "IndexerProxies": "Proxies del Indexador", "IndexerHistoryLoadError": "Error al cargar el historial del Indexador", - "IndexerVipCheckExpiredClientMessage": "Las ventajas VIP del Indexador han caducado: {0}", + "IndexerVipExpiredHealthCheckMessage": "Las ventajas VIP del Indexador han caducado: {indexerNames}", "IndexerQuery": "Consulta dedl Indexador", "IndexerSite": "Sitio del Indexador", "IndexerStatus": "Estado del indexador", diff --git a/src/NzbDrone.Core/Localization/Core/fi.json b/src/NzbDrone.Core/Localization/Core/fi.json index 2bd232714..be74545de 100644 --- a/src/NzbDrone.Core/Localization/Core/fi.json +++ b/src/NzbDrone.Core/Localization/Core/fi.json @@ -317,7 +317,7 @@ "IndexerObsoleteCheckMessage": "Tietolähteet ovat poistuneet tai ne ovat muuttuneet: {0}. Poista ja/tai lisää ne {appName}iin uudelleen.", "IndexerProxy": "Tiedonhaun välityspalvelin", "IndexerSettingsSummary": "Määritä useita globaaleita tietolähdeasetuksia, kuten välityspalvelimia.", - "IndexerVipCheckExpiringClientMessage": "Tietolähteen VIP-edut erääntyvät pian: {0}", + "IndexerVipExpiringHealthCheckMessage": "Tietolähteen VIP-edut erääntyvät pian: {indexerNames}", "ProwlarrSupportsAnyIndexer": "{appName} tukee Newznab- ja Torznab-yhteensopivien tietolähteiden ohella myös useita muita lähteitä vaihtoehdoilla \"Yleinen Newznab\" (Usenetille) ja 'Yleinen Torznab' (torrenteille).", "SettingsIndexerLogging": "Tehostettu tietolähteiden valvonta", "AddIndexerProxy": "Lisää tiedonhaun välityspalvelin", @@ -330,7 +330,7 @@ "IndexerRss": "Tietolähteen RSS", "SearchIndexers": "Etsi tietolähteistä", "AddRemoveOnly": "Ainoastaan lisää/poista", - "IndexerVipCheckExpiredClientMessage": "Tietolähteen VIP-edut ovat erääntyneet: {0}", + "IndexerVipExpiredHealthCheckMessage": "Tietolähteen VIP-edut ovat erääntyneet: {indexerNames}", "MaintenanceRelease": "Huoltojulkaisu: korjauksia ja muita parannuksia. Lue lisää Githubin muutoshistoriasta.", "Query": "Kysely", "Redirect": "Uudelleenohjaus", diff --git a/src/NzbDrone.Core/Localization/Core/fr.json b/src/NzbDrone.Core/Localization/Core/fr.json index 402c268aa..776528a3d 100644 --- a/src/NzbDrone.Core/Localization/Core/fr.json +++ b/src/NzbDrone.Core/Localization/Core/fr.json @@ -368,13 +368,13 @@ "AppSettingsSummary": "Applications et paramètres pour configurer comment {appName} interagit avec vos programmes PVR", "IndexerTagsHelpText": "Utilisez des étiquettes pour spécifier les proxies d'indexation ou les applications avec lesquelles l'indexeur est synchronisé.", "Notifications": "Notifications", - "IndexerVipCheckExpiredClientMessage": "Les avantages VIP de l'indexeur ont expiré : {0}", + "IndexerVipExpiredHealthCheckMessage": "Les avantages VIP de l'indexeur ont expiré : {indexerNames}", "IndexerProxy": "Proxy d'indexation", "IndexerSettingsSummary": "Configuration de divers paramètres globaux de l'indexeur, y compris les proxies.", "IndexerProxies": "Proxys d'indexation", "IndexerProxyStatusAllUnavailableHealthCheckMessage": "Tous les proxys sont indisponibles en raison d'échecs", "IndexerProxyStatusUnavailableHealthCheckMessage": "Proxys indisponibles en raison d'échecs : {indexerProxyNames}", - "IndexerVipCheckExpiringClientMessage": "Les avantages VIP de l'indexeur arrivent bientôt à expiration : {0}", + "IndexerVipExpiringHealthCheckMessage": "Les avantages VIP de l'indexeur arrivent bientôt à expiration : {indexerNames}", "NoLinks": "Aucun liens", "Notification": "Notification", "UnableToAddANewIndexerProxyPleaseTryAgain": "Impossible d'ajouter un nouveau proxy d'indexation, veuillez réessayer.", diff --git a/src/NzbDrone.Core/Localization/Core/hu.json b/src/NzbDrone.Core/Localization/Core/hu.json index f5c8eb80c..608be849e 100644 --- a/src/NzbDrone.Core/Localization/Core/hu.json +++ b/src/NzbDrone.Core/Localization/Core/hu.json @@ -374,8 +374,8 @@ "IndexerSettingsSummary": "Konfigurálja a különböző globális indexer beállításokat, beleértve a proxykat is.", "Notifications": "Értesítések", "UnableToAddANewIndexerProxyPleaseTryAgain": "Nem lehet új Indexer Proxyt hozzáadni, próbálja újra.", - "IndexerVipCheckExpiredClientMessage": "Az Indexer VIP előnyei lejártak: {0}", - "IndexerVipCheckExpiringClientMessage": "Az Indexer VIP előnyei hamarosan lejárnak: {0}", + "IndexerVipExpiredHealthCheckMessage": "Az Indexer VIP előnyei lejártak: {indexerNames}", + "IndexerVipExpiringHealthCheckMessage": "Az Indexer VIP előnyei hamarosan lejárnak: {indexerNames}", "IndexerProxy": "Indexelő Proxy", "NoLinks": "Nincsenek Linkek", "Notification": "Értesítés", diff --git a/src/NzbDrone.Core/Localization/Core/it.json b/src/NzbDrone.Core/Localization/Core/it.json index d046328d9..1ecd02999 100644 --- a/src/NzbDrone.Core/Localization/Core/it.json +++ b/src/NzbDrone.Core/Localization/Core/it.json @@ -365,8 +365,8 @@ "Apps": "Le App", "DevelopmentSettings": "Impostazioni di Sviluppo", "RedirectHelpText": "Reindirizza le richieste di download per l'Indicizzatore e passa il prelievo direttamente invece di inoltrare la richiesta tramite {appName}", - "IndexerVipCheckExpiredClientMessage": "I benefici VIP dell'Indicizzatore sono scaduti: {0}", - "IndexerVipCheckExpiringClientMessage": "I benefici VIP dell'Indicizzatore scadranno a breve: {0}", + "IndexerVipExpiredHealthCheckMessage": "I benefici VIP dell'Indicizzatore sono scaduti: {indexerNames}", + "IndexerVipExpiringHealthCheckMessage": "I benefici VIP dell'Indicizzatore scadranno a breve: {indexerNames}", "IndexerProxies": "Proxy degli Indicizzatori", "Stats": "Statistiche", "SyncAppIndexers": "Sincronizza tutti gli indicizzatori", diff --git a/src/NzbDrone.Core/Localization/Core/nl.json b/src/NzbDrone.Core/Localization/Core/nl.json index 0922cc5a5..cd700d98e 100644 --- a/src/NzbDrone.Core/Localization/Core/nl.json +++ b/src/NzbDrone.Core/Localization/Core/nl.json @@ -185,8 +185,8 @@ "IndexerStatusCheckAllClientMessage": "Alle indexeerders zijn onbeschikbaar wegens fouten", "IndexerStatusCheckSingleClientMessage": "Indexeerders onbeschikbaar wegens fouten: {0}", "IndexerTagsHelpText": "Gebruik tags om standaardclients op te geven, Indexeerder-proxy's op te geven of gewoon om uw indexeerders te ordenen.", - "IndexerVipCheckExpiredClientMessage": "Indexeerder VIP-voordelen zijn verlopen: {0}", - "IndexerVipCheckExpiringClientMessage": "Indexeerder VIP-voordelen verlopen binnenkort: {0}", + "IndexerVipExpiredHealthCheckMessage": "Indexeerder VIP-voordelen zijn verlopen: {indexerNames}", + "IndexerVipExpiringHealthCheckMessage": "Indexeerder VIP-voordelen verlopen binnenkort: {indexerNames}", "Indexers": "Indexeerders", "Info": "Info", "InstanceName": "Naam van de instantie", diff --git a/src/NzbDrone.Core/Localization/Core/pt_BR.json b/src/NzbDrone.Core/Localization/Core/pt_BR.json index ffe6ec937..f2895b59b 100644 --- a/src/NzbDrone.Core/Localization/Core/pt_BR.json +++ b/src/NzbDrone.Core/Localization/Core/pt_BR.json @@ -216,8 +216,8 @@ "IndexerStatusCheckAllClientMessage": "Todos os indexadores estão indisponíveis devido a falhas", "IndexerStatusCheckSingleClientMessage": "Indexadores indisponíveis devido a falhas: {0}", "IndexerTagsHelpText": "Use tags para especificar Proxies do indexador ou com quais aplicativos o indexador está sincronizado.", - "IndexerVipCheckExpiredClientMessage": "Benefícios VIP do Indexador expiraram: {0}", - "IndexerVipCheckExpiringClientMessage": "Os benefícios VIPS do Indexador expirarão em breve: {0}", + "IndexerVipExpiredHealthCheckMessage": "Benefícios VIP do Indexador expiraram: {indexerNames}", + "IndexerVipExpiringHealthCheckMessage": "Os benefícios VIPS do Indexador expirarão em breve: {indexerNames}", "Indexers": "Indexadores", "Info": "Informações", "InitialFailure": "Falha Inicial", diff --git a/src/NzbDrone.Core/Localization/Core/ro.json b/src/NzbDrone.Core/Localization/Core/ro.json index eb8271593..eba9f2f6e 100644 --- a/src/NzbDrone.Core/Localization/Core/ro.json +++ b/src/NzbDrone.Core/Localization/Core/ro.json @@ -328,7 +328,7 @@ "EnableRssHelpText": "Activați flux RSS pentru indexator", "IndexerHealthCheckNoIndexers": "Niciun indexator nu este activat, {appName} nu va returna rezultate la căutare.", "IndexerProxy": "Proxy indexator", - "IndexerVipCheckExpiredClientMessage": "Beneficiile VIP pentru indexator au expirat: {0}", + "IndexerVipExpiredHealthCheckMessage": "Beneficiile VIP pentru indexator au expirat: {indexerNames}", "IndexerNoDefCheckMessage": "Indexatorii nu au definiție și nu vor funcționa: {0}. Vă rugăm să-i ștergeți și (sau) să-i adăugați din nou în {appName}", "IndexerRss": "RSS indexator", "EnabledRedirected": "Activat, Redirecționat", @@ -363,7 +363,7 @@ "FullSync": "Sincronizare completă", "IndexerObsoleteCheckMessage": "Indexatorii sunt învechiți sau nu au fost actualizați: {0}. Vă rugăm să-i ștergeți și (sau) să-i adăugați din nou în {appName}", "IndexerProxies": "Proxiuri indexatoare", - "IndexerVipCheckExpiringClientMessage": "Beneficiile VIP pentru indexator expiră în curând: {0}", + "IndexerVipExpiringHealthCheckMessage": "Beneficiile VIP pentru indexator expiră în curând: {indexerNames}", "ApplicationLongTermStatusCheckAllClientMessage": "Toate aplicațiile sunt indisponibile din cauza unor eșecuri pentru mai mult de 6 ore", "ApplicationLongTermStatusCheckSingleClientMessage": "Aplicațiile indisponibile din cauza unor eșecuri pentru mai mult de 6 ore: {0}", "LastDuration": "Ultima durată", diff --git a/src/NzbDrone.Core/Localization/Core/sv.json b/src/NzbDrone.Core/Localization/Core/sv.json index 2d0cc7227..20bd4781d 100644 --- a/src/NzbDrone.Core/Localization/Core/sv.json +++ b/src/NzbDrone.Core/Localization/Core/sv.json @@ -342,8 +342,8 @@ "NoSearchResultsFound": "Inget sökresultat hittat, försök utföra en ny sökning nedan.", "NetCore": ".NET", "MaintenanceRelease": "Underhållsutgåva", - "IndexerVipCheckExpiringClientMessage": "Indexer VIP förmåner utgår snart: {0}", - "IndexerVipCheckExpiredClientMessage": "Indexer VIP förmåner har utgått: {0}", + "IndexerVipExpiringHealthCheckMessage": "Indexer VIP förmåner utgår snart: {indexerNames}", + "IndexerVipExpiredHealthCheckMessage": "Indexer VIP förmåner har utgått: {indexerNames}", "IndexerTagsHelpText": "Använd taggar för att specificera standardklient, specificera Indexer Proxies, eller bara för att organisera dina indexers.", "IndexerSettingsSummary": "Konfigurera flera globala Indexerinställningar, includerat Proxies.", "IndexerRss": "Indexer Rss", diff --git a/src/NzbDrone.Core/Localization/Core/zh_CN.json b/src/NzbDrone.Core/Localization/Core/zh_CN.json index 35c94f567..efada1129 100644 --- a/src/NzbDrone.Core/Localization/Core/zh_CN.json +++ b/src/NzbDrone.Core/Localization/Core/zh_CN.json @@ -215,8 +215,8 @@ "IndexerStatusCheckAllClientMessage": "所有搜刮器都因错误不可用", "IndexerStatusCheckSingleClientMessage": "搜刮器因错误不可用:{0}", "IndexerTagsHelpText": "使用标签来指定索引器代理或索引器同步到哪些应用程序。", - "IndexerVipCheckExpiredClientMessage": "索引器VIP特权已过期:{0}", - "IndexerVipCheckExpiringClientMessage": "索引器VIP特权即将过期:{0}", + "IndexerVipExpiredHealthCheckMessage": "索引器VIP特权已过期:{indexerNames}", + "IndexerVipExpiringHealthCheckMessage": "索引器VIP特权即将过期:{indexerNames}", "Indexers": "索引器", "Info": "信息", "InitialFailure": "初始化失败",