diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2021-01-23 14:45:18 -0500 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2021-01-23 15:39:35 -0500 |
| commit | ed333dec434aaed93b7df735b5f7f9987bd277d4 (patch) | |
| tree | 81b81256b7269da0f7c6ddd8359a0e057b2a79aa /Jellyfin.Api/Controllers/PlaylistsController.cs | |
| parent | c17c32f9dc5e6e2fd6604118eb2d2f81db1b3629 (diff) | |
Merge pull request #5069 from crobibero/obsolete-param
(cherry picked from commit 4b6b90e0b14743581c5606a37249d86e291afc95)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
Diffstat (limited to 'Jellyfin.Api/Controllers/PlaylistsController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/PlaylistsController.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Jellyfin.Api/Controllers/PlaylistsController.cs b/Jellyfin.Api/Controllers/PlaylistsController.cs index fcdad4bc7..a55e4ad2f 100644 --- a/Jellyfin.Api/Controllers/PlaylistsController.cs +++ b/Jellyfin.Api/Controllers/PlaylistsController.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; +using Jellyfin.Api.Attributes; using Jellyfin.Api.Constants; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; @@ -57,6 +58,7 @@ namespace Jellyfin.Api.Controllers /// </summary> /// <remarks> /// For backwards compatibility parameters can be sent via Query or Body, with Query having higher precedence. + /// Query parameters are obsolete. /// </remarks> /// <param name="name">The playlist name.</param> /// <param name="ids">The item ids.</param> @@ -70,10 +72,10 @@ namespace Jellyfin.Api.Controllers [HttpPost] [ProducesResponseType(StatusCodes.Status200OK)] public async Task<ActionResult<PlaylistCreationResult>> CreatePlaylist( - [FromQuery] string? name, - [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] IReadOnlyList<Guid> ids, - [FromQuery] Guid? userId, - [FromQuery] string? mediaType, + [FromQuery, ParameterObsolete] string? name, + [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder)), ParameterObsolete] IReadOnlyList<Guid> ids, + [FromQuery, ParameterObsolete] Guid? userId, + [FromQuery, ParameterObsolete] string? mediaType, [FromBody(EmptyBodyBehavior = EmptyBodyBehavior.Allow)] CreatePlaylistDto? createPlaylistRequest) { if (ids.Count == 0) |
