Fixed: Persist Indexer Flags when manual importing from queue
This commit is contained in:
parent
1299a97579
commit
217611d716
|
@ -215,6 +215,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Manual
|
||||||
{
|
{
|
||||||
DownloadClientItem downloadClientItem = null;
|
DownloadClientItem downloadClientItem = null;
|
||||||
Series series = null;
|
Series series = null;
|
||||||
|
TrackedDownload trackedDownload = null;
|
||||||
|
|
||||||
var directoryInfo = new DirectoryInfo(baseFolder);
|
var directoryInfo = new DirectoryInfo(baseFolder);
|
||||||
|
|
||||||
|
@ -236,7 +237,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Manual
|
||||||
|
|
||||||
if (downloadId.IsNotNullOrWhiteSpace())
|
if (downloadId.IsNotNullOrWhiteSpace())
|
||||||
{
|
{
|
||||||
var trackedDownload = _trackedDownloadService.Find(downloadId);
|
trackedDownload = _trackedDownloadService.Find(downloadId);
|
||||||
downloadClientItem = trackedDownload.DownloadItem;
|
downloadClientItem = trackedDownload.DownloadItem;
|
||||||
|
|
||||||
if (series == null)
|
if (series == null)
|
||||||
|
@ -272,6 +273,11 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Manual
|
||||||
var seriesFiles = _diskScanService.FilterPaths(rootFolder, _diskScanService.GetVideoFiles(baseFolder).ToList());
|
var seriesFiles = _diskScanService.FilterPaths(rootFolder, _diskScanService.GetVideoFiles(baseFolder).ToList());
|
||||||
var decisions = _importDecisionMaker.GetImportDecisions(seriesFiles, series, downloadClientItem, folderInfo, SceneSource(series, baseFolder), filterExistingFiles);
|
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();
|
return decisions.Select(decision => MapItem(decision, rootFolder, downloadId, directoryInfo.Name)).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -331,7 +337,10 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Manual
|
||||||
|
|
||||||
if (importDecisions.Any())
|
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)
|
catch (Exception ex)
|
||||||
|
|
Loading…
Reference in New Issue