|
|
|
@ -29,6 +29,7 @@ namespace Sonarr.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; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -41,6 +42,9 @@ namespace Sonarr.Api.V3.ManualImport
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var customFormats = model.CustomFormats;
|
|
|
|
|
var customFormatScore = model.Series?.QualityProfile?.Value?.CalculateCustomFormatScore(customFormats) ?? 0;
|
|
|
|
|
|
|
|
|
|
return new ManualImportResource
|
|
|
|
|
{
|
|
|
|
|
Id = HashConverter.GetHashInt31(model.Path),
|
|
|
|
@ -56,7 +60,8 @@ namespace Sonarr.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,
|
|
|
|
|