mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 06:45:19 -07:00
Fixed: Error when processing manual import decisions (#1670)
This commit is contained in:
parent
c33d9727a0
commit
3eab8248e6
2 changed files with 16 additions and 1 deletions
|
@ -368,6 +368,11 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
|
|||
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 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Manual
|
|||
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…
Add table
Add a link
Reference in a new issue