1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2025-02-27 00:02:25 +00:00

New: Include APFS disks in disk space

This commit is contained in:
Qstick 2017-12-03 16:00:07 -05:00
parent 7be4a376ef
commit d884914c81
2 changed files with 4 additions and 3 deletions

View file

@ -81,8 +81,8 @@ public override List<IMount> GetMounts()
.Concat(GetDriveInfoMounts() .Concat(GetDriveInfoMounts()
.Select(d => new DriveInfoMount(d, FindDriveType.Find(d.DriveFormat))) .Select(d => new DriveInfoMount(d, FindDriveType.Find(d.DriveFormat)))
.Where(d => d.DriveType == DriveType.Fixed || .Where(d => d.DriveType == DriveType.Fixed ||
d.DriveType == DriveType.Network || d.DriveType == d.DriveType == DriveType.Network ||
DriveType.Removable)) d.DriveType == DriveType.Removable))
.DistinctBy(v => v.RootDirectory) .DistinctBy(v => v.RootDirectory)
.ToList(); .ToList();
} }

View file

@ -1,4 +1,4 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using NzbDrone.Common.Extensions; using NzbDrone.Common.Extensions;
@ -9,6 +9,7 @@ public static class FindDriveType
private static readonly Dictionary<string, DriveType> DriveTypeMap = new Dictionary<string, DriveType> private static readonly Dictionary<string, DriveType> DriveTypeMap = new Dictionary<string, DriveType>
{ {
{ "afpfs", DriveType.Network }, { "afpfs", DriveType.Network },
{ "apfs", DriveType.Fixed },
{ "zfs", DriveType.Fixed } { "zfs", DriveType.Fixed }
}; };