Skip to content

Commit

Permalink
Show an artist path as example in Mount Health Check
Browse files Browse the repository at this point in the history
  • Loading branch information
mynameisbogdan committed Nov 4, 2024
1 parent e39e990 commit 23f7dc3
Show file tree
Hide file tree
Showing 31 changed files with 39 additions and 35 deletions.
14 changes: 9 additions & 5 deletions src/NzbDrone.Core/HealthCheck/Checks/MountCheck.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Linq;
using NzbDrone.Common.Disk;
using NzbDrone.Core.Localization;
Expand All @@ -19,16 +20,19 @@ public MountCheck(IDiskProvider diskProvider, IArtistService artistService, ILoc

public override HealthCheck Check()
{
// Not best for optimization but due to possible symlinks and junctions, we get mounts based on series path so internals can handle mount resolution.
// Not best for optimization but due to possible symlinks and junctions, we get mounts based on artist paths so internals can handle mount resolution.
var mounts = _artistService.AllArtistPaths()
.Select(path => _diskProvider.GetMount(path.Value))
.Where(m => m is { MountOptions.IsReadOnly: true })
.DistinctBy(m => m.RootDirectory)
.Select(p => new Tuple<IMount, string>(_diskProvider.GetMount(p.Value), p.Value))
.Where(m => m.Item1 is { MountOptions.IsReadOnly: true })
.DistinctBy(m => m.Item1.RootDirectory)
.ToList();

if (mounts.Any())
{
return new HealthCheck(GetType(), HealthCheckResult.Error, _localizationService.GetLocalizedString("MountCheckMessage") + string.Join(", ", mounts.Select(m => m.Name)), "#movie-mount-ro");
return new HealthCheck(GetType(),
HealthCheckResult.Error,
$"{_localizationService.GetLocalizedString("MountArtistHealthCheckMessage")}{string.Join(", ", mounts.Select(m => $"{m.Item1.Name} ({m.Item2})"))}",
"#artist-mount-ro");
}

return new HealthCheck(GetType());
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@
"ImportListStatusCheckSingleClientMessage": "القوائم غير متاحة بسبب الإخفاقات: {0}",
"IndexerRssHealthCheckNoIndexers": "لا توجد مفهرسات متاحة مع تمكين مزامنة RSS ، ولن يحصل {appName} على الإصدارات الجديدة تلقائيًا",
"IndexerSearchCheckNoAutomaticMessage": "لا تتوفر مفهرسات مع تمكين البحث التلقائي ، ولن يقدم {appName} أي نتائج بحث تلقائية",
"MountCheckMessage": "تم تثبيت الحامل الذي يحتوي على مسار فيلم للقراءة فقط: ",
"MountArtistHealthCheckMessage": "تم تثبيت الحامل الذي يحتوي على مسار فيلم للقراءة فقط: ",
"ProxyCheckResolveIpMessage": "فشل حل عنوان IP لمضيف الخادم الوكيل المكون {0}",
"ReplaceWithDash": "استبدل بـ داش",
"AppDataLocationHealthCheckMessage": "لن يكون التحديث ممكنًا لمنع حذف AppData عند التحديث",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@
"IndexerSearchCheckNoAutomaticMessage": "Няма налични индексатори с активирано автоматично търсене, {appName} няма да предоставя резултати от автоматично търсене",
"IndexerSearchCheckNoAvailableIndexersMessage": "Всички индексатори с възможност за търсене са временно недостъпни поради скорошни грешки в индексатора",
"IndexerStatusCheckAllClientMessage": "Всички индексатори са недостъпни поради грешки",
"MountCheckMessage": "Монтажът, съдържащ път на филм, е монтиран само за четене: ",
"MountArtistHealthCheckMessage": "Монтажът, съдържащ път на филм, е монтиран само за четене: ",
"ProxyCheckBadRequestMessage": "Неуспешно тестване на прокси. Код на състоянието: {0}",
"ProxyCheckResolveIpMessage": "Неуспешно разрешаване на IP адреса за конфигурирания прокси хост {0}",
"ReplaceWithDash": "Заменете с Dash",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@
"IndexerStatusCheckAllClientMessage": "Tots els indexadors no estan disponibles a causa d'errors",
"IndexerLongTermStatusCheckSingleClientMessage": "Els indexadors no estan disponibles a causa d'errors durant més de 6 hores: {0}",
"IndexerStatusCheckSingleClientMessage": "Els indexadors no estan disponibles a causa d'errors: {0}",
"MountCheckMessage": "El muntatge que conté una ruta de pel·lícula es munta com a només de lectura: ",
"MountArtistHealthCheckMessage": "El muntatge que conté una ruta de pel·lícula es munta com a només de lectura: ",
"ReplaceWithDash": "Substitueix per guió",
"ReplaceWithSpaceDash": "Substitueix per espai i guió",
"ReplaceWithSpaceDashSpace": "Substitueix per espai, guió i espai",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@
"IndexerSearchCheckNoAutomaticMessage": "Nejsou k dispozici žádné indexery se zapnutým automatickým vyhledáváním, {appName} neposkytne žádné automatické výsledky hledání",
"IndexerSearchCheckNoAvailableIndexersMessage": "Všechny indexery podporující vyhledávání jsou dočasně nedostupné kvůli nedávným chybám indexeru",
"IndexerStatusCheckSingleClientMessage": "Indexery nedostupné z důvodu selhání: {0}",
"MountCheckMessage": "Mount obsahující filmovou cestu je připojen jen pro čtení: ",
"MountArtistHealthCheckMessage": "Mount obsahující filmovou cestu je připojen jen pro čtení: ",
"ProxyCheckBadRequestMessage": "Nepodařilo se otestovat proxy. StatusCode: {0}",
"ProxyCheckFailedToTestMessage": "Nepodařilo se otestovat proxy: {0}",
"ProxyCheckResolveIpMessage": "Nepodařilo se vyřešit adresu IP konfigurovaného hostitele proxy {0}",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@
"IndexerSearchCheckNoInteractiveMessage": "Ingen indexere er tilgængelige med Interaktiv Søg aktiveret, {appName} vil ikke give nogle interaktive søge resultater",
"IndexerStatusCheckAllClientMessage": "Alle indeksører er utilgængelige på grund af fejl",
"IndexerStatusCheckSingleClientMessage": "Indexere utilgængelige på grund af fejl: {0}",
"MountCheckMessage": "Mount, der indeholder en filmsti, er monteret skrivebeskyttet: ",
"MountArtistHealthCheckMessage": "Mount, der indeholder en filmsti, er monteret skrivebeskyttet: ",
"ProxyCheckBadRequestMessage": "Kunne ikke teste proxy. Statuskode: {0}",
"ProxyCheckFailedToTestMessage": "Kunne ikke teste proxy: {0}",
"ProxyCheckResolveIpMessage": "Mislykkedes at løse IP-adressen til den konfigurerede proxyhost {0}",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@
"IndexerSearchCheckNoInteractiveMessage": "Keine Indexer mit aktivierter interaktiver Suche verfügbar, {appName} wird keine interaktiven Suchergebnisse liefern",
"IndexerStatusCheckAllClientMessage": "Alle Indexer sind aufgrund von Fehlern nicht verfügbar",
"IndexerStatusCheckSingleClientMessage": "Indexer aufgrund von Fehlern nicht verfügbar: {0}",
"MountCheckMessage": "Der Einhängepunkt, welcher einen Filmpfad enthält, ist schreibgeschützt eingehängt: ",
"MountArtistHealthCheckMessage": "Der Einhängepunkt, welcher einen Filmpfad enthält, ist schreibgeschützt eingehängt: ",
"ProxyCheckBadRequestMessage": "Proxy konnte nicht getestet werden. StatusCode: {0}",
"ProxyCheckFailedToTestMessage": "Proxy konnte nicht getestet werden: {0}",
"ProxyCheckResolveIpMessage": "Fehler beim Auflösen der IP-Adresse für den konfigurierten Proxy-Host {0}",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@
"IndexerLongTermStatusCheckAllClientMessage": "Όλοι οι δείκτες δεν είναι διαθέσιμοι λόγω αστοχιών για περισσότερο από 6 ώρες",
"IndexerStatusCheckAllClientMessage": "Όλοι οι δείκτες δεν είναι διαθέσιμοι λόγω αστοχιών",
"IndexerStatusCheckSingleClientMessage": "Τα ευρετήρια δεν είναι διαθέσιμα λόγω αστοχιών: {0}",
"MountCheckMessage": "Το προσάρτημα που περιέχει μια διαδρομή ταινίας είναι τοποθετημένο μόνο για ανάγνωση: ",
"MountArtistHealthCheckMessage": "Το προσάρτημα που περιέχει μια διαδρομή ταινίας είναι τοποθετημένο μόνο για ανάγνωση: ",
"RemotePathMappingCheckFileRemoved": "Το αρχείο {0} καταργήθηκε εν μέρει κατά την επεξεργασία.",
"RemotePathMappingCheckFilesBadDockerPath": "Χρησιμοποιείτε docker. λήψη αρχείων πελάτη {0} που αναφέρθηκαν στο {1} αλλά αυτή δεν είναι έγκυρη διαδρομή {2}. Ελέγξτε τις απομακρυσμένες αντιστοιχίσεις διαδρομής και κατεβάστε τις ρυθμίσεις πελάτη.",
"RemotePathMappingCheckFilesGenericPermissions": "Λήψη αρχείων πελάτη {0} που αναφέρθηκαν στο {1} αλλά το {appName} δεν μπορεί να δει αυτόν τον κατάλογο. Ίσως χρειαστεί να προσαρμόσετε τα δικαιώματα του φακέλου.",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@
"MonitoringOptions": "Monitoring Options",
"MonitoringOptionsHelpText": "Which albums should be monitored after the artist is added (one-time adjustment)",
"MoreInfo": "More Info",
"MountCheckMessage": "Mount containing music path is mounted read-only: ",
"MountArtistHealthCheckMessage": "Mount containing an artist path is mounted read-only: ",
"MoveAutomatically": "Move Automatically",
"MoveFiles": "Move Files",
"MultiDiscTrackFormat": "Multi Disc Track Format",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@
"DownloadClientCheckNoneAvailableMessage": "Ningún cliente de descarga disponible",
"DownloadClientCheckUnableToCommunicateMessage": "No se pudo comunicar con {0}.",
"IndexerStatusCheckSingleClientMessage": "Indexadores no disponibles debido a errores: {0}",
"MountCheckMessage": "El punto de montaje que contiene la ruta de música está montado como solo lectura: ",
"MountArtistHealthCheckMessage": "El punto de montaje que contiene la ruta de música está montado como solo lectura: ",
"RemotePathMappingCheckFilesGenericPermissions": "El cliente de descarga {0} informó de la existencia de archivos en {1} pero {appName} no puede ver este directorio. Es posible que tenga que ajustar los permisos de la carpeta.",
"RemotePathMappingCheckFilesLocalWrongOSPath": "El cliente de descarga local {0} informó de la existencia de archivos en {1}, pero no es una ruta válida {2}. Revise la configuración de su cliente de descarga.",
"RemotePathMappingCheckGenericPermissions": "El cliente de descarga {0} coloca las descargas en {1} pero {appName} no puede ver este directorio. Es posible que tenga que ajustar los permisos de la carpeta.",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@
"UnableToLoadCustomFormats": "Virhe ladattaessa mukautettuja muotoja",
"Customformat": "Mukautettu muoto",
"ExportCustomFormat": "Vie mukautettu muoto",
"MountCheckMessage": "Kohteen sijainnin sisältävä media on kytketty vain luku -tilassa: ",
"MountArtistHealthCheckMessage": "Kohteen sijainnin sisältävä media on kytketty vain luku -tilassa: ",
"NoResultsFound": "Tuloksia ei löytynyt.",
"CustomFormatSettings": "Mukautettujen muotojen asetukset",
"AlbumStudioTracksDownloaded": "{trackFileCount}/{totalTrackCount} kappaletta ladattu",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@
"IndexerStatusCheckAllClientMessage": "Tous les indexeurs sont indisponibles en raison d'échecs",
"IndexerStatusCheckSingleClientMessage": "Indexeurs indisponibles en raison d'échecs : {0}",
"Loading": "Chargement",
"MountCheckMessage": "Le montage contenant un chemin de film est monté en lecture seule : ",
"MountArtistHealthCheckMessage": "Le montage contenant un chemin de film est monté en lecture seule : ",
"ProxyCheckBadRequestMessage": "Échec du test du proxy. StatusCode : {0}",
"ProxyCheckFailedToTestMessage": "Échec du test du proxy : {0}",
"ProxyCheckResolveIpMessage": "Impossible de résoudre l'adresse IP de l'hôte proxy configuré {0}",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@
"DownloadClientStatusCheckSingleClientMessage": "הורדת לקוחות לא זמינה עקב כשלים: {0}",
"IndexerStatusCheckAllClientMessage": "כל האינדקסים אינם זמינים עקב כשלים",
"IndexerStatusCheckSingleClientMessage": "אינדקסים לא זמינים בגלל כשלים: {0}",
"MountCheckMessage": "הר המכיל נתיב סרט מותקן לקריאה בלבד: ",
"MountArtistHealthCheckMessage": "הר המכיל נתיב סרט מותקן לקריאה בלבד: ",
"ProxyCheckBadRequestMessage": "נכשל בדיקת ה- proxy. קוד קוד: {0}",
"ProxyCheckFailedToTestMessage": "נכשל בדיקת ה- proxy: {0}",
"ProxyCheckResolveIpMessage": "פתרון כתובת ה- IP עבור מארח ה- Proxy המוגדר {0} נכשל",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@
"IndexerSearchCheckNoInteractiveMessage": "इंटरएक्टिव सर्च सक्षम के साथ कोई भी इंडेक्स उपलब्ध नहीं है, रेडर किसी भी इंटरैक्टिव खोज परिणाम प्रदान नहीं करेगा",
"IndexerStatusCheckAllClientMessage": "विफलताओं के कारण सभी अनुक्रमणिका अनुपलब्ध हैं",
"IndexerStatusCheckSingleClientMessage": "अनुक्रमणिका विफलताओं के कारण अनुपलब्ध: {0}",
"MountCheckMessage": "मूवी पथ पर माउंट माउंट केवल पढ़ने योग्य है: ",
"MountArtistHealthCheckMessage": "मूवी पथ पर माउंट माउंट केवल पढ़ने योग्य है: ",
"ProxyCheckBadRequestMessage": "प्रॉक्सी का परीक्षण करने में विफल। स्थिति कोड: {0}",
"ProxyCheckFailedToTestMessage": "प्रॉक्सी का परीक्षण करने में विफल: {0}",
"ProxyCheckResolveIpMessage": "कॉन्फ़िगर प्रॉक्सी होस्ट {0} के लिए आईपी एड्रेस को हल करने में विफल",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@
"DownloadClientCheckUnableToCommunicateMessage": "Nem lehet kommunikálni a következővel: {0}.",
"DownloadClientStatusCheckAllClientMessage": "Az összes letöltőkliens elérhetetlen, hiba miatt",
"DownloadClientStatusCheckSingleClientMessage": "Letöltőkliens hiba miatt nem elérhető: {0}",
"MountCheckMessage": "A filmútvonalat tartalmazó mappa csak olvasható: ",
"MountArtistHealthCheckMessage": "A filmútvonalat tartalmazó mappa csak olvasható: ",
"ProxyCheckBadRequestMessage": "Proxy tesztelése sikertelen. Állapotkód: {0}",
"ProxyCheckFailedToTestMessage": "Proxy tesztelése sikertelen: {0}",
"ProxyCheckResolveIpMessage": "Nem sikerült megoldani a konfigurált proxykiszolgáló IP-címét {0}",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/is.json
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@
"IndexerLongTermStatusCheckSingleClientMessage": "Vísitölufólk er ekki tiltækt vegna bilana í meira en 6 klukkustundir: {0}",
"IndexerRssHealthCheckNoAvailableIndexers": "Allir indexers sem styðja rss eru tímabundið ófáanlegir vegna nýlegra villubreytinga",
"IndexerRssHealthCheckNoIndexers": "Engir verðtryggingaraðilar í boði með RSS samstillingu virkt, {appName} mun ekki grípa í nýjar útgáfur sjálfkrafa",
"MountCheckMessage": "Fjall sem inniheldur kvikmyndaslóð er aðeins skrifvarið: ",
"MountArtistHealthCheckMessage": "Fjall sem inniheldur kvikmyndaslóð er aðeins skrifvarið: ",
"ReplaceWithDash": "Skiptu um með Dash",
"ReplaceWithSpaceDashSpace": "Skiptu um með Space Dash Space",
"RootFolderCheckMultipleMessage": "Margar rótarmöppur vantar: {0}",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@
"IndexerSearchCheckNoInteractiveMessage": "Non è disponibile nessun indexer con abilitata la Ricerca Interattiva, {appName} non fornirà nessun risultato tramite la ricerca interattiva",
"IndexerStatusCheckAllClientMessage": "Nessun Indicizzatore disponibile a causa di errori",
"IndexerStatusCheckSingleClientMessage": "Indicizzatori non disponibili a causa di errori: {0}",
"MountCheckMessage": "La destinazione contenente il percorso di un film è montata in sola lettura: ",
"MountArtistHealthCheckMessage": "La destinazione contenente il percorso di un film è montata in sola lettura: ",
"ProxyCheckFailedToTestMessage": "Test del proxy fallito: {0}",
"ProxyCheckBadRequestMessage": "Il test del proxy è fallito. Codice Stato: {0}",
"RemotePathMappingCheckBadDockerPath": "Stai utilizzando docker; Il client di download {0} mette i download in {1} ma questo non è un percorso valido {2}. Controlla la mappa dei percorsi remoti e le impostazioni del client di download.",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@
"IndexerRssHealthCheckNoAvailableIndexers": "最近のインデクサーエラーのため、すべてのrss対応インデクサーは一時的に利用できません",
"IndexerStatusCheckAllClientMessage": "障害のため、すべてのインデクサーを使用できません",
"IndexerStatusCheckSingleClientMessage": "失敗のためインデクサーを利用できません:{0}",
"MountCheckMessage": "ムービーパスを含むマウントは読み取り専用でマウントされます。 ",
"MountArtistHealthCheckMessage": "ムービーパスを含むマウントは読み取り専用でマウントされます。 ",
"RootFolderCheckMultipleMessage": "複数のルートフォルダがありません:{0}",
"RootFolderCheckSingleMessage": "ルートフォルダがありません:{0}",
"ShownClickToHide": "表示、クリックして非表示",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@
"ImportMechanismHealthCheckMessage": "완료된 다운로드 처리 활성화",
"IndexerRssHealthCheckNoIndexers": "RSS 동기화가 활성화 된 상태에서 사용할 수있는 인덱서가 없습니다. Whisparr는 새 출시를 자동으로 가져 오지 않습니다.",
"IndexerSearchCheckNoAutomaticMessage": "자동 검색이 활성화 된 상태에서 사용할 수있는 인덱서가 없습니다. Whisparr는 자동 검색 결과를 제공하지 않습니다.",
"MountCheckMessage": "동영상 경로가 포함된 마운트는 읽기 전용으로 마운트됩니다. ",
"MountArtistHealthCheckMessage": "동영상 경로가 포함된 마운트는 읽기 전용으로 마운트됩니다. ",
"ProxyCheckFailedToTestMessage": "프록시 테스트 실패 : {0}",
"ProxyCheckResolveIpMessage": "구성된 프록시 호스트 {0}의 IP 주소를 확인하지 못했습니다.",
"UpdateCheckStartupNotWritableMessage": "'{1}'사용자가 '{0}'시작 폴더에 쓸 수 없기 때문에 업데이트를 설치할 수 없습니다.",
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Localization/Core/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@
"DownloadClientStatusCheckAllClientMessage": "Alle downloaders zijn onbeschikbaar wegens fouten",
"ImportListStatusCheckAllClientMessage": "Alle lijsten zijn onbeschikbaar wegens fouten",
"ImportListStatusCheckSingleClientMessage": "Lijsten onbeschikbaar wegens fouten: {0}",
"MountCheckMessage": "Een mount dat een film pad bevat is gemount als alleen-lezen: ",
"MountArtistHealthCheckMessage": "Een mount dat een film pad bevat is gemount als alleen-lezen: ",
"ProxyCheckBadRequestMessage": "Testen van proxy is mislukt. Statuscode: {0}",
"ProxyCheckFailedToTestMessage": "Testen van proxy is mislukt: {0}",
"RemotePathMappingCheckDownloadPermissions": "{appName} kan gedownloade film {0} zien, maar niet openen. Waarschijnlijk fout met machtigingen.",
Expand Down
Loading

0 comments on commit 23f7dc3

Please sign in to comment.