diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-11-21 00:35:53 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-21 00:35:53 +0000 |
| commit | 7a6063ed41bb75ce087ceb38279426fed025b1ff (patch) | |
| tree | a5261bee96f1eed0825944b7c8d7318b2d93ce8d /Jellyfin.Api/Controllers/LibraryController.cs | |
| parent | 9a9b2bfb2ea6a39d1a46f16355b42d930b307177 (diff) | |
| parent | d2cef78db3c6f5c1063f8205ed5309f5243be66b (diff) | |
Merge branch 'master' into NetworkPR2
Diffstat (limited to 'Jellyfin.Api/Controllers/LibraryController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/LibraryController.cs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Jellyfin.Api/Controllers/LibraryController.cs b/Jellyfin.Api/Controllers/LibraryController.cs index 1b115d800..3ff77e8e0 100644 --- a/Jellyfin.Api/Controllers/LibraryController.cs +++ b/Jellyfin.Api/Controllers/LibraryController.cs @@ -362,15 +362,14 @@ namespace Jellyfin.Api.Controllers [Authorize(Policy = Policies.DefaultAuthorization)] [ProducesResponseType(StatusCodes.Status204NoContent)] [ProducesResponseType(StatusCodes.Status401Unauthorized)] - public ActionResult DeleteItems([FromQuery] string? ids) + public ActionResult DeleteItems([FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] string[] ids) { - if (string.IsNullOrEmpty(ids)) + if (ids.Length == 0) { return NoContent(); } - var itemIds = RequestHelpers.Split(ids, ',', true); - foreach (var i in itemIds) + foreach (var i in ids) { var item = _libraryManager.GetItemById(i); var auth = _authContext.GetAuthorizationInfo(Request); @@ -691,7 +690,7 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status200OK)] public ActionResult<QueryResult<BaseItemDto>> GetSimilarItems( [FromRoute, Required] Guid itemId, - [FromQuery] string? excludeArtistIds, + [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] Guid[] excludeArtistIds, [FromQuery] Guid? userId, [FromQuery] int? limit, [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ItemFields[] fields) @@ -753,9 +752,9 @@ namespace Jellyfin.Api.Controllers }; // ExcludeArtistIds - if (!string.IsNullOrEmpty(excludeArtistIds)) + if (excludeArtistIds.Length != 0) { - query.ExcludeArtistIds = RequestHelpers.GetGuids(excludeArtistIds); + query.ExcludeArtistIds = excludeArtistIds; } List<BaseItem> itemsResult = _libraryManager.GetItemList(query); |
