mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-21 22:25:03 -04:00
New: Loads of Backend Updates to Clients and Indexers
This commit is contained in:
@@ -2,7 +2,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
using NzbDrone.Common.Extensions;
|
||||
|
||||
@@ -98,15 +97,16 @@ namespace NzbDrone.Common.Disk
|
||||
{
|
||||
return d.DriveType != DriveType.Network;
|
||||
}
|
||||
|
||||
return true;
|
||||
})
|
||||
.Select(d => new FileSystemModel
|
||||
{
|
||||
Type = FileSystemEntityType.Drive,
|
||||
Name = GetVolumeName(d),
|
||||
Path = d.RootDirectory,
|
||||
LastModified = null
|
||||
})
|
||||
{
|
||||
Type = FileSystemEntityType.Drive,
|
||||
Name = GetVolumeName(d),
|
||||
Path = d.RootDirectory,
|
||||
LastModified = null
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -118,6 +118,7 @@ namespace NzbDrone.Common.Disk
|
||||
{
|
||||
result.Parent = GetParent(path);
|
||||
result.Directories = GetDirectories(path);
|
||||
|
||||
if (includeFiles)
|
||||
{
|
||||
result.Files = GetFiles(path);
|
||||
@@ -149,12 +150,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()));
|
||||
@@ -167,14 +168,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();
|
||||
}
|
||||
|
||||
@@ -184,6 +185,7 @@ namespace NzbDrone.Common.Disk
|
||||
{
|
||||
return mountInfo.Name;
|
||||
}
|
||||
|
||||
return $"{mountInfo.Name} ({mountInfo.VolumeLabel})";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user