Language comment in Manual Import

Closes #9612
pull/9690/head
Bogdan 10 months ago
parent 99ab65f790
commit f9cd9f3204

@ -22,12 +22,14 @@ namespace Radarr.Api.V3.ManualImport
}
[HttpGet]
[Produces("application/json")]
public List<ManualImportResource> GetMediaFiles(string folder, string downloadId, int? movieId, bool filterExistingFiles = true)
{
return _manualImportService.GetMediaFiles(folder, downloadId, movieId, filterExistingFiles).ToResource().Select(AddQualityWeight).ToList();
}
[HttpPost]
[Consumes("application/json")]
public object ReprocessItems([FromBody] List<ManualImportReprocessResource> items)
{
foreach (var item in items)
@ -39,8 +41,8 @@ namespace Radarr.Api.V3.ManualImport
item.CustomFormats = processedItem.CustomFormats.ToResource(false);
item.CustomFormatScore = processedItem.CustomFormatScore;
if (item.Languages?.Count <= 1 && (item.Languages?.SingleOrDefault() ?? Language.Unknown) == Language.Unknown &&
processedItem.Languages.Any())
// Only set the language/quality if they're unknown and languages were returned.
if (item.Languages?.Count <= 1 && (item.Languages?.SingleOrDefault() ?? Language.Unknown) == Language.Unknown && processedItem.Languages.Any())
{
item.Languages = processedItem.Languages;
}

Loading…
Cancel
Save