mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
@@ -101,12 +101,12 @@ namespace NzbDrone.Common.Disk
|
||||
return true;
|
||||
})
|
||||
.Select(d => new FileSystemModel
|
||||
{
|
||||
Type = FileSystemEntityType.Drive,
|
||||
Name = d.VolumeName,
|
||||
Path = d.RootDirectory,
|
||||
LastModified = null
|
||||
})
|
||||
{
|
||||
Type = FileSystemEntityType.Drive,
|
||||
Name = d.VolumeName,
|
||||
Path = d.RootDirectory,
|
||||
LastModified = null
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -124,7 +124,6 @@ namespace NzbDrone.Common.Disk
|
||||
result.Files = GetFiles(path);
|
||||
}
|
||||
}
|
||||
|
||||
catch (DirectoryNotFoundException)
|
||||
{
|
||||
return new FileSystemResult { Parent = GetParent(path) };
|
||||
@@ -150,12 +149,12 @@ namespace NzbDrone.Common.Disk
|
||||
var directories = _diskProvider.GetDirectoryInfos(path)
|
||||
.OrderBy(d => d.Name)
|
||||
.Select(d => new FileSystemModel
|
||||
{
|
||||
Name = d.Name,
|
||||
Path = GetDirectoryPath(d.FullName.GetActualCasing()),
|
||||
LastModified = d.LastWriteTimeUtc,
|
||||
Type = FileSystemEntityType.Folder
|
||||
})
|
||||
{
|
||||
Name = d.Name,
|
||||
Path = GetDirectoryPath(d.FullName.GetActualCasing()),
|
||||
LastModified = d.LastWriteTimeUtc,
|
||||
Type = FileSystemEntityType.Folder
|
||||
})
|
||||
.ToList();
|
||||
|
||||
directories.RemoveAll(d => _setToRemove.Contains(d.Name.ToLowerInvariant()));
|
||||
@@ -168,14 +167,14 @@ namespace NzbDrone.Common.Disk
|
||||
return _diskProvider.GetFileInfos(path)
|
||||
.OrderBy(d => d.Name)
|
||||
.Select(d => new FileSystemModel
|
||||
{
|
||||
Name = d.Name,
|
||||
Path = d.FullName.GetActualCasing(),
|
||||
LastModified = d.LastWriteTimeUtc,
|
||||
Extension = d.Extension,
|
||||
Size = d.Length,
|
||||
Type = FileSystemEntityType.File
|
||||
})
|
||||
{
|
||||
Name = d.Name,
|
||||
Path = d.FullName.GetActualCasing(),
|
||||
LastModified = d.LastWriteTimeUtc,
|
||||
Extension = d.Extension,
|
||||
Size = d.Length,
|
||||
Type = FileSystemEntityType.File
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -185,7 +184,7 @@ namespace NzbDrone.Common.Disk
|
||||
{
|
||||
return mountInfo.Name;
|
||||
}
|
||||
|
||||
|
||||
return $"{mountInfo.Name} ({mountInfo.VolumeLabel})";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user