1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-17 15:02:34 +02:00

Fixed: Error when processing manual import decisions (#1670)

This commit is contained in:
Mitchell Cash 2017-06-13 16:40:51 +10:00 committed by Leonardo Galli
parent c33d9727a0
commit 3eab8248e6
2 changed files with 16 additions and 1 deletions

View File

@ -368,6 +368,11 @@ private ImportDecision GetDecision(string file, Series series, ParsedEpisodeInfo
decision = new ImportDecision(localEpisode, new Rejection("Unexpected error processing file"));
}
if (decision == null)
{
_logger.Error("Unable to make a decision on {0}", file);
}
return decision;
}

View File

@ -160,7 +160,17 @@ private ManualImportItem ProcessFile(string file, string downloadId, string fold
var importDecisions = _importDecisionMaker.GetImportDecisions(new List<string> { file },
movie, null, SceneSource(movie, folder), true);
return importDecisions.Any() ? MapItem(importDecisions.First(), folder, downloadId) : null;
return importDecisions.Any() ? MapItem(importDecisions.First(), folder, downloadId) : new ManualImportItem
{
DownloadId = downloadId,
Path = file,
RelativePath = folder.GetRelativePath(file),
Name = Path.GetFileNameWithoutExtension(file),
Rejections = new List<Rejection>
{
new Rejection("Unable to process file")
}
};
}
//private ManualImportItem ProcessFile(string file, string downloadId, string folder = null)