mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-19 21:46:50 -04:00
New: Show Custom Format score in Manual Import
(cherry picked from commit 972e1408993fc4656196087c6646f23d222e41f5) Closes #8839
This commit is contained in:
@@ -25,6 +25,7 @@ namespace Radarr.Api.V3.ManualImport
|
||||
public int QualityWeight { get; set; }
|
||||
public string DownloadId { get; set; }
|
||||
public List<CustomFormatResource> CustomFormats { get; set; }
|
||||
public int CustomFormatScore { get; set; }
|
||||
public IEnumerable<Rejection> Rejections { get; set; }
|
||||
}
|
||||
|
||||
@@ -37,6 +38,9 @@ namespace Radarr.Api.V3.ManualImport
|
||||
return null;
|
||||
}
|
||||
|
||||
var customFormats = model.CustomFormats;
|
||||
var customFormatScore = model.Movie?.Profile?.CalculateCustomFormatScore(customFormats) ?? 0;
|
||||
|
||||
return new ManualImportResource
|
||||
{
|
||||
Id = HashConverter.GetHashInt31(model.Path),
|
||||
@@ -49,7 +53,8 @@ namespace Radarr.Api.V3.ManualImport
|
||||
ReleaseGroup = model.ReleaseGroup,
|
||||
Quality = model.Quality,
|
||||
Languages = model.Languages,
|
||||
CustomFormats = model.CustomFormats.ToResource(false),
|
||||
CustomFormats = customFormats.ToResource(false),
|
||||
CustomFormatScore = customFormatScore,
|
||||
|
||||
// QualityWeight
|
||||
DownloadId = model.DownloadId,
|
||||
|
||||
Reference in New Issue
Block a user