mirror of
https://github.com/Radarr/Radarr.git
synced 2026-03-05 13:21:25 -05:00
Return error if Manual Import called without items
(cherry picked from commit 4bdb0408f1bafa38b777a41babb1a775f99a94c1)
This commit is contained in:
committed by
Robin Dadswell
parent
3bb4e52078
commit
42512cbcae
@@ -8,6 +8,7 @@ using NzbDrone.Core.Qualities;
|
||||
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 @@ namespace Radarr.Api.V3.ManualImport
|
||||
[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);
|
||||
|
||||
Reference in New Issue
Block a user