mirror of
https://github.com/Radarr/Radarr
synced 2025-12-06 08:28:50 +01:00
Return error if Manual Import called without items
(cherry picked from commit 4bdb0408f1bafa38b777a41babb1a775f99a94c1)
This commit is contained in:
parent
0525256115
commit
787c387036
1 changed files with 6 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
|||
using Radarr.Api.V3.CustomFormats;
|
||||
using Radarr.Api.V3.Movies;
|
||||
using Radarr.Http;
|
||||
using Radarr.Http.REST;
|
||||
|
||||
namespace Radarr.Api.V3.ManualImport
|
||||
{
|
||||
|
|
@ -37,6 +38,11 @@ public List<ManualImportResource> GetMediaFiles(string folder, string downloadId
|
|||
[Consumes("application/json")]
|
||||
public object ReprocessItems([FromBody] List<ManualImportReprocessResource> items)
|
||||
{
|
||||
if (items is { Count: 0 })
|
||||
{
|
||||
throw new BadRequestException("items must be provided");
|
||||
}
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
var processedItem = _manualImportService.ReprocessItem(item.Path, item.DownloadId, item.MovieId, item.ReleaseGroup, item.Quality, item.Languages, item.IndexerFlags);
|
||||
|
|
|
|||
Loading…
Reference in a new issue