mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-27 02:43:57 +02:00
Fixed: Persist Indexer Flags when manual importing from queue
This commit is contained in:
parent
1299a97579
commit
217611d716
@ -215,6 +215,7 @@ private List<ManualImportItem> ProcessFolder(string rootFolder, string baseFolde
|
||||
{
|
||||
DownloadClientItem downloadClientItem = null;
|
||||
Series series = null;
|
||||
TrackedDownload trackedDownload = null;
|
||||
|
||||
var directoryInfo = new DirectoryInfo(baseFolder);
|
||||
|
||||
@ -236,7 +237,7 @@ private List<ManualImportItem> ProcessFolder(string rootFolder, string baseFolde
|
||||
|
||||
if (downloadId.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
var trackedDownload = _trackedDownloadService.Find(downloadId);
|
||||
trackedDownload = _trackedDownloadService.Find(downloadId);
|
||||
downloadClientItem = trackedDownload.DownloadItem;
|
||||
|
||||
if (series == null)
|
||||
@ -272,6 +273,11 @@ private List<ManualImportItem> ProcessFolder(string rootFolder, string baseFolde
|
||||
var seriesFiles = _diskScanService.FilterPaths(rootFolder, _diskScanService.GetVideoFiles(baseFolder).ToList());
|
||||
var decisions = _importDecisionMaker.GetImportDecisions(seriesFiles, series, downloadClientItem, folderInfo, SceneSource(series, baseFolder), filterExistingFiles);
|
||||
|
||||
foreach (var decision in decisions)
|
||||
{
|
||||
decision.LocalEpisode.IndexerFlags = trackedDownload?.RemoteEpisode?.Release?.IndexerFlags ?? 0;
|
||||
}
|
||||
|
||||
return decisions.Select(decision => MapItem(decision, rootFolder, downloadId, directoryInfo.Name)).ToList();
|
||||
}
|
||||
|
||||
@ -331,7 +337,10 @@ private ManualImportItem ProcessFile(string rootFolder, string baseFolder, strin
|
||||
|
||||
if (importDecisions.Any())
|
||||
{
|
||||
return MapItem(importDecisions.First(), rootFolder, downloadId, null);
|
||||
var importDecision = importDecisions.First();
|
||||
importDecision.LocalEpisode.IndexerFlags = trackedDownload?.RemoteEpisode?.Release?.IndexerFlags ?? 0;
|
||||
|
||||
return MapItem(importDecision, rootFolder, downloadId, null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
Loading…
Reference in New Issue
Block a user