From 59f3be08137d10254affb4bfef04fb7aa8646d02 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Mon, 4 Nov 2024 02:12:52 +0200 Subject: [PATCH] Show a series path as example in Mount Health Check --- src/NzbDrone.Core/HealthCheck/Checks/MountCheck.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Core/HealthCheck/Checks/MountCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/MountCheck.cs index 46f1ea103..a37200e6c 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/MountCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/MountCheck.cs @@ -1,3 +1,4 @@ +using System; using System.Linq; using NzbDrone.Common.Disk; using NzbDrone.Core.Localization; @@ -21,16 +22,16 @@ namespace NzbDrone.Core.HealthCheck.Checks { // Not best for optimization but due to possible symlinks and junctions, we get mounts based on series path so internals can handle mount resolution. var mounts = _seriesService.GetAllSeriesPaths() - .Select(s => _diskProvider.GetMount(s.Value)) - .Where(m => m is { MountOptions.IsReadOnly: true }) - .DistinctBy(m => m.RootDirectory) + .Select(p => new Tuple(_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("MountSeriesHealthCheckMessage")}{string.Join(", ", mounts.Select(m => m.Name))}", + $"{_localizationService.GetLocalizedString("MountSeriesHealthCheckMessage")}{string.Join(", ", mounts.Select(m => $"{m.Item1.Name} ({m.Item2})"))}", "#series-mount-ro"); }