|
|
@ -1,4 +1,4 @@
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.IO;
|
|
|
|
using System.IO;
|
|
|
@ -73,6 +73,7 @@ namespace NzbDrone.Core.RootFolders
|
|
|
|
if (folder.Path.IsPathValid() && _diskProvider.FolderExists(folder.Path))
|
|
|
|
if (folder.Path.IsPathValid() && _diskProvider.FolderExists(folder.Path))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
folder.FreeSpace = _diskProvider.GetAvailableSpace(folder.Path);
|
|
|
|
folder.FreeSpace = _diskProvider.GetAvailableSpace(folder.Path);
|
|
|
|
|
|
|
|
folder.TotalSpace = _diskProvider.GetTotalSize(folder.Path);
|
|
|
|
folder.UnmappedFolders = GetUnmappedFolders(folder.Path);
|
|
|
|
folder.UnmappedFolders = GetUnmappedFolders(folder.Path);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -80,7 +81,6 @@ namespace NzbDrone.Core.RootFolders
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.Error(ex, "Unable to get free space and unmapped folders for root folder {0}", folder.Path);
|
|
|
|
_logger.Error(ex, "Unable to get free space and unmapped folders for root folder {0}", folder.Path);
|
|
|
|
folder.FreeSpace = 0;
|
|
|
|
|
|
|
|
folder.UnmappedFolders = new List<UnmappedFolder>();
|
|
|
|
folder.UnmappedFolders = new List<UnmappedFolder>();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -167,8 +167,9 @@ namespace NzbDrone.Core.RootFolders
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var rootFolder = _rootFolderRepository.Get(id);
|
|
|
|
var rootFolder = _rootFolderRepository.Get(id);
|
|
|
|
rootFolder.FreeSpace = _diskProvider.GetAvailableSpace(rootFolder.Path);
|
|
|
|
rootFolder.FreeSpace = _diskProvider.GetAvailableSpace(rootFolder.Path);
|
|
|
|
|
|
|
|
rootFolder.TotalSpace = _diskProvider.GetTotalSize(rootFolder.Path);
|
|
|
|
rootFolder.UnmappedFolders = GetUnmappedFolders(rootFolder.Path);
|
|
|
|
rootFolder.UnmappedFolders = GetUnmappedFolders(rootFolder.Path);
|
|
|
|
return rootFolder;
|
|
|
|
return rootFolder;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|