aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/PlaylistsController.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2021-01-20 16:24:15 -0700
committercrobibero <cody@robibe.ro>2021-01-20 16:24:15 -0700
commit59ff2c5b4b26a435751f1bbdecd8dc309f14e7da (patch)
tree45fcd977891882a8e956f2ff6d5f3dd581edce25 /Jellyfin.Api/Controllers/PlaylistsController.cs
parent215554bb4111cabae8ba1deacb534b947732b5e3 (diff)
Add ability to mark query parameter as obsolete.
Diffstat (limited to 'Jellyfin.Api/Controllers/PlaylistsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/PlaylistsController.cs10
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)