mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-29 13:25:13 +02:00
Added more logging when free disk space check fails on import
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using System.IO;
|
using System;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common;
|
using NzbDrone.Common;
|
||||||
@@ -21,6 +22,8 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
|
|||||||
public string RejectionReason { get { return "Not enough free space"; } }
|
public string RejectionReason { get { return "Not enough free space"; } }
|
||||||
|
|
||||||
public bool IsSatisfiedBy(LocalEpisode localEpisode)
|
public bool IsSatisfiedBy(LocalEpisode localEpisode)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var path = Directory.GetParent(localEpisode.Series.Path);
|
var path = Directory.GetParent(localEpisode.Series.Path);
|
||||||
var freeSpace = _diskProvider.GetAvilableSpace(path.FullName);
|
var freeSpace = _diskProvider.GetAvilableSpace(path.FullName);
|
||||||
@@ -33,5 +36,11 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.ErrorException("Unable to check free disk space while importing: " + localEpisode.Path, ex);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user