mirror of
https://github.com/Lidarr/Lidarr
synced 2025-12-06 08:25:54 +01:00
Fixed: Include network drive types in Disk Space
(cherry picked from commit 9ffcd141a515e99604881a4ef383dadafef31eeb)
This commit is contained in:
parent
979042948d
commit
5bb1949ea2
1 changed files with 5 additions and 2 deletions
|
|
@ -38,7 +38,10 @@ public List<DiskSpace> GetFreeSpace()
|
||||||
|
|
||||||
var optionalRootFolders = GetFixedDisksRootPaths().Except(importantRootFolders).Distinct().ToList();
|
var optionalRootFolders = GetFixedDisksRootPaths().Except(importantRootFolders).Distinct().ToList();
|
||||||
|
|
||||||
var diskSpace = GetDiskSpace(importantRootFolders).Concat(GetDiskSpace(optionalRootFolders, true)).ToList();
|
var diskSpace = GetDiskSpace(importantRootFolders)
|
||||||
|
.Concat(GetDiskSpace(optionalRootFolders, true))
|
||||||
|
.OrderBy(d => d.Path, StringComparer.OrdinalIgnoreCase)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
return diskSpace;
|
return diskSpace;
|
||||||
}
|
}
|
||||||
|
|
@ -54,7 +57,7 @@ private IEnumerable<string> GetRootPaths()
|
||||||
private IEnumerable<string> GetFixedDisksRootPaths()
|
private IEnumerable<string> GetFixedDisksRootPaths()
|
||||||
{
|
{
|
||||||
return _diskProvider.GetMounts()
|
return _diskProvider.GetMounts()
|
||||||
.Where(d => d.DriveType == DriveType.Fixed)
|
.Where(d => d.DriveType is DriveType.Fixed or DriveType.Network)
|
||||||
.Where(d => !_regexSpecialDrive.IsMatch(d.RootDirectory))
|
.Where(d => !_regexSpecialDrive.IsMatch(d.RootDirectory))
|
||||||
.Select(d => d.RootDirectory);
|
.Select(d => d.RootDirectory);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue