mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-06 02:52:41 +01:00
Fix manual import for when downloaded movies are in a folder
This commit is contained in:
parent
a1961603d7
commit
6ab6c016c0
@ -104,12 +104,12 @@ public List<ManualImportItem> GetMediaFiles(string path, string downloadId)
|
|||||||
private List<ManualImportItem> ProcessFolder(string folder, string downloadId)
|
private List<ManualImportItem> ProcessFolder(string folder, string downloadId)
|
||||||
{
|
{
|
||||||
var directoryInfo = new DirectoryInfo(folder);
|
var directoryInfo = new DirectoryInfo(folder);
|
||||||
var series = _parsingService.GetSeries(directoryInfo.Name);
|
var series = _parsingService.GetMovie(directoryInfo.Name);
|
||||||
|
|
||||||
if (series == null && downloadId.IsNotNullOrWhiteSpace())
|
if (series == null && downloadId.IsNotNullOrWhiteSpace())
|
||||||
{
|
{
|
||||||
var trackedDownload = _trackedDownloadService.Find(downloadId);
|
var trackedDownload = _trackedDownloadService.Find(downloadId);
|
||||||
series = trackedDownload.RemoteEpisode.Series;
|
series = trackedDownload.RemoteMovie.Movie;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (series == null)
|
if (series == null)
|
||||||
@ -119,9 +119,9 @@ private List<ManualImportItem> ProcessFolder(string folder, string downloadId)
|
|||||||
return files.Select(file => ProcessFile(file, downloadId, folder)).Where(i => i != null).ToList();
|
return files.Select(file => ProcessFile(file, downloadId, folder)).Where(i => i != null).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
var folderInfo = Parser.Parser.ParseTitle(directoryInfo.Name);
|
var folderInfo = Parser.Parser.ParseMovieTitle(directoryInfo.Name);
|
||||||
var seriesFiles = _diskScanService.GetVideoFiles(folder).ToList();
|
var seriesFiles = _diskScanService.GetVideoFiles(folder).ToList();
|
||||||
var decisions = _importDecisionMaker.GetImportDecisions(seriesFiles, series, folderInfo, SceneSource(series, folder));
|
var decisions = _importDecisionMaker.GetImportDecisions(seriesFiles, series, folderInfo, SceneSource(series, folder), false);
|
||||||
|
|
||||||
return decisions.Select(decision => MapItem(decision, folder, downloadId)).ToList();
|
return decisions.Select(decision => MapItem(decision, folder, downloadId)).ToList();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user