Update RootFolder Health Check

pull/6/head
Qstick 7 years ago
parent 18971f9ea2
commit 0d8bec272e

@ -1,23 +1,23 @@
using System.Linq;
using System.Linq;
using NzbDrone.Common.Disk;
using NzbDrone.Core.Tv;
using NzbDrone.Core.Music;
namespace NzbDrone.Core.HealthCheck.Checks
{
public class RootFolderCheck : HealthCheckBase
{
private readonly ISeriesService _seriesService;
private readonly IArtistService _artistService;
private readonly IDiskProvider _diskProvider;
public RootFolderCheck(ISeriesService seriesService, IDiskProvider diskProvider)
public RootFolderCheck(IArtistService artistService, IDiskProvider diskProvider)
{
_seriesService = seriesService;
_artistService = artistService;
_diskProvider = diskProvider;
}
public override HealthCheck Check()
{
var missingRootFolders = _seriesService.GetAllSeries()
var missingRootFolders = _artistService.GetAllArtists()
.Select(s => _diskProvider.GetParentFolder(s.Path))
.Distinct()
.Where(s => !_diskProvider.FolderExists(s))

Loading…
Cancel
Save