mirror of
https://github.com/Radarr/Radarr
synced 2025-03-09 21:55:34 +00:00
Fixed: Calculate custom formats after setting user-chosen attributes in manual import
Necessary to calculate the correct scoring post-manual import for those custom formats that are dependent on other attributes like for example the quality.
This commit is contained in:
parent
92a19a1a81
commit
0f1cf21c39
1 changed files with 10 additions and 9 deletions
|
@ -308,6 +308,13 @@ namespace NzbDrone.Core.MediaFiles.MovieImport.Manual
|
|||
item.Name = Path.GetFileNameWithoutExtension(decision.LocalMovie.Path);
|
||||
item.DownloadId = downloadId;
|
||||
|
||||
item.Quality = decision.LocalMovie.Quality;
|
||||
item.Size = _diskProvider.GetFileSize(decision.LocalMovie.Path);
|
||||
item.Languages = decision.LocalMovie.Languages;
|
||||
item.ReleaseGroup = decision.LocalMovie.ReleaseGroup;
|
||||
item.Rejections = decision.Rejections;
|
||||
item.IndexerFlags = (int)decision.LocalMovie.IndexerFlags;
|
||||
|
||||
if (decision.LocalMovie.Movie != null)
|
||||
{
|
||||
item.Movie = decision.LocalMovie.Movie;
|
||||
|
@ -316,13 +323,6 @@ namespace NzbDrone.Core.MediaFiles.MovieImport.Manual
|
|||
item.CustomFormatScore = item.Movie.QualityProfile?.CalculateCustomFormatScore(item.CustomFormats) ?? 0;
|
||||
}
|
||||
|
||||
item.Quality = decision.LocalMovie.Quality;
|
||||
item.Size = _diskProvider.GetFileSize(decision.LocalMovie.Path);
|
||||
item.Languages = decision.LocalMovie.Languages;
|
||||
item.ReleaseGroup = decision.LocalMovie.ReleaseGroup;
|
||||
item.Rejections = decision.Rejections;
|
||||
item.IndexerFlags = (int)decision.LocalMovie.IndexerFlags;
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
|
@ -371,8 +371,6 @@ namespace NzbDrone.Core.MediaFiles.MovieImport.Manual
|
|||
|
||||
// Augment movie file so imported files have all additional information an automatic import would
|
||||
localMovie = _aggregationService.Augment(localMovie, trackedDownload?.DownloadItem);
|
||||
localMovie.CustomFormats = _formatCalculator.ParseCustomFormat(localMovie);
|
||||
localMovie.CustomFormatScore = localMovie.Movie.QualityProfile?.CalculateCustomFormatScore(localMovie.CustomFormats) ?? 0;
|
||||
|
||||
// Apply the user-chosen values.
|
||||
localMovie.Movie = movie;
|
||||
|
@ -381,6 +379,9 @@ namespace NzbDrone.Core.MediaFiles.MovieImport.Manual
|
|||
localMovie.Languages = file.Languages;
|
||||
localMovie.IndexerFlags = (IndexerFlags)file.IndexerFlags;
|
||||
|
||||
localMovie.CustomFormats = _formatCalculator.ParseCustomFormat(localMovie);
|
||||
localMovie.CustomFormatScore = localMovie.Movie.QualityProfile?.CalculateCustomFormatScore(localMovie.CustomFormats) ?? 0;
|
||||
|
||||
// TODO: Cleanup non-tracked downloads
|
||||
var importDecision = new ImportDecision(localMovie);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue