mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
Episodes will not be imported if disk space is low
New: Episodes will not be imported when disk space is too low to complete the import
This commit is contained in:
parent
a11dc2d204
commit
65df24988c
2 changed files with 119 additions and 4 deletions
|
@ -68,6 +68,15 @@ namespace NzbDrone.Core.Providers
|
|||
return;
|
||||
}
|
||||
|
||||
var size = _diskProvider.GetDirectorySize(subfolderInfo.FullName);
|
||||
var freeSpace = _diskProvider.FreeDiskSpace(new DirectoryInfo(series.Path));
|
||||
|
||||
if (Convert.ToUInt64(size) > freeSpace)
|
||||
{
|
||||
Logger.Error("Not enough free disk space for series: {0}, {1}", series.Title, series.Path);
|
||||
return;
|
||||
}
|
||||
|
||||
_diskScanProvider.CleanUpDropFolder(subfolderInfo.FullName);
|
||||
|
||||
var importedFiles = _diskScanProvider.Scan(series, subfolderInfo.FullName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue