diff options
Diffstat (limited to 'Jellyfin.Api/Controllers/PlaylistsController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/PlaylistsController.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/PlaylistsController.cs b/Jellyfin.Api/Controllers/PlaylistsController.cs index 59e6fd779d..9679180937 100644 --- a/Jellyfin.Api/Controllers/PlaylistsController.cs +++ b/Jellyfin.Api/Controllers/PlaylistsController.cs @@ -359,6 +359,7 @@ public class PlaylistsController : BaseJellyfinApiController /// </summary> /// <param name="playlistId">The playlist id.</param> /// <param name="ids">Item id, comma delimited.</param> + /// <param name="position">Optional. 0-based index where to place the items or at the end if <c>null</c>.</param> /// <param name="userId">The userId.</param> /// <response code="204">Items added to playlist.</response> /// <response code="403">Access forbidden.</response> @@ -371,6 +372,7 @@ public class PlaylistsController : BaseJellyfinApiController public async Task<ActionResult> AddItemToPlaylist( [FromRoute, Required] Guid playlistId, [FromQuery, ModelBinder(typeof(CommaDelimitedCollectionModelBinder))] Guid[] ids, + [FromQuery] int? position, [FromQuery] Guid? userId) { userId = RequestHelpers.GetUserId(User, userId); @@ -388,7 +390,7 @@ public class PlaylistsController : BaseJellyfinApiController return Forbid(); } - await _playlistManager.AddItemToPlaylistAsync(playlistId, ids, userId.Value).ConfigureAwait(false); + await _playlistManager.AddItemToPlaylistAsync(playlistId, ids, position, userId.Value).ConfigureAwait(false); return NoContent(); } |
