mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 04:22:30 +01:00
Fixed: Error when processing manual import decisions (#1670)
This commit is contained in:
parent
c33d9727a0
commit
3eab8248e6
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user