|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|