1
0
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:
jack-mil
2023-07-17 23:46:36 -04:00
committed by Bogdan
parent ffde07e4d6
commit 36338310df
7 changed files with 26 additions and 4 deletions
@@ -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,