Additional logging when on import decision

pull/94/head
Qstick 7 years ago
parent 828d70b0bd
commit 44e4e46b15

@ -114,6 +114,19 @@ namespace NzbDrone.Core.MediaFiles.TrackImport
decision = new ImportDecision(localTrack, new Rejection("Unexpected error processing file"));
}
if (decision == null)
{
_logger.Error("Unable to make a decision on {0}", file);
}
else if (decision.Rejections.Any())
{
_logger.Debug("File rejected for the following reasons: {0}", string.Join(", ", decision.Rejections));
}
else
{
_logger.Debug("File accepted");
}
return decision;
}
@ -192,7 +205,7 @@ namespace NzbDrone.Core.MediaFiles.TrackImport
private Language GetLanguage(ParsedTrackInfo folderInfo, Language fileLanguage, Artist artist)
{
if (UseFolderLanguage (folderInfo, fileLanguage, artist))
if (UseFolderLanguage(folderInfo, fileLanguage, artist))
{
_logger.Debug("Using language from folder: {0}", folderInfo.Language);
return folderInfo.Language;

Loading…
Cancel
Save