From 7169c0a22da8147e1fd00f6568e41d235123809f Mon Sep 17 00:00:00 2001 From: Ionut Andrei Oanca Date: Thu, 3 Dec 2020 19:01:57 +0100 Subject: [PATCH] Move SyncPlay request DTOs to proper namespace --- .../Controllers/SyncPlayController.cs | 34 +++++++++---------- .../Models/SyncPlayDtos/BufferRequestDto.cs | 10 +++--- .../SyncPlayDtos/IgnoreWaitRequestDto.cs | 6 ++-- .../SyncPlayDtos/JoinGroupRequestDto.cs | 6 ++-- .../MovePlaylistItemRequestDto.cs | 10 +++--- .../Models/SyncPlayDtos/NewGroupRequestDto.cs | 10 +++--- .../Models/SyncPlayDtos/NextItemRequestDto.cs | 10 +++--- .../Models/SyncPlayDtos/PingRequestDto.cs | 6 ++-- .../Models/SyncPlayDtos/PlayRequestDto.cs | 10 +++--- .../SyncPlayDtos/PreviousItemRequestDto.cs | 10 +++--- .../Models/SyncPlayDtos/QueueRequestDto.cs | 11 +++--- .../Models/SyncPlayDtos/ReadyRequestDto.cs | 8 ++--- .../RemoveFromPlaylistRequestDto.cs | 10 +++--- .../Models/SyncPlayDtos/SeekRequestDto.cs | 6 ++-- .../SyncPlayDtos/SetPlaylistItemRequestDto.cs | 10 +++--- .../SyncPlayDtos/SetRepeatModeRequestDto.cs | 8 +++-- .../SyncPlayDtos/SetShuffleModeRequestDto.cs | 8 +++-- .../SyncPlay/ISyncPlayManager.cs | 1 - 18 files changed, 89 insertions(+), 85 deletions(-) rename MediaBrowser.Model/SyncPlay/RequestBodies/BufferRequestBody.cs => Jellyfin.Api/Models/SyncPlayDtos/BufferRequestDto.cs (86%) rename MediaBrowser.Model/SyncPlay/RequestBodies/IgnoreWaitRequestBody.cs => Jellyfin.Api/Models/SyncPlayDtos/IgnoreWaitRequestDto.cs (68%) rename MediaBrowser.Model/SyncPlay/RequestBodies/JoinGroupRequestBody.cs => Jellyfin.Api/Models/SyncPlayDtos/JoinGroupRequestDto.cs (67%) rename MediaBrowser.Model/SyncPlay/RequestBodies/MovePlaylistItemRequestBody.cs => Jellyfin.Api/Models/SyncPlayDtos/MovePlaylistItemRequestDto.cs (74%) rename MediaBrowser.Model/SyncPlay/RequestBodies/NewGroupRequestBody.cs => Jellyfin.Api/Models/SyncPlayDtos/NewGroupRequestDto.cs (68%) rename MediaBrowser.Model/SyncPlay/RequestBodies/NextItemRequestBody.cs => Jellyfin.Api/Models/SyncPlayDtos/NextItemRequestDto.cs (70%) rename MediaBrowser.Model/SyncPlay/RequestBodies/PingRequestBody.cs => Jellyfin.Api/Models/SyncPlayDtos/PingRequestDto.cs (65%) rename MediaBrowser.Model/SyncPlay/RequestBodies/PlayRequestBody.cs => Jellyfin.Api/Models/SyncPlayDtos/PlayRequestDto.cs (84%) rename MediaBrowser.Model/SyncPlay/RequestBodies/PreviousItemRequestBody.cs => Jellyfin.Api/Models/SyncPlayDtos/PreviousItemRequestDto.cs (68%) rename MediaBrowser.Model/SyncPlay/RequestBodies/QueueRequestBody.cs => Jellyfin.Api/Models/SyncPlayDtos/QueueRequestDto.cs (77%) rename MediaBrowser.Model/SyncPlay/RequestBodies/ReadyRequestBody.cs => Jellyfin.Api/Models/SyncPlayDtos/ReadyRequestDto.cs (88%) rename MediaBrowser.Model/SyncPlay/RequestBodies/RemoveFromPlaylistRequestBody.cs => Jellyfin.Api/Models/SyncPlayDtos/RemoveFromPlaylistRequestDto.cs (70%) rename MediaBrowser.Model/SyncPlay/RequestBodies/SeekRequestBody.cs => Jellyfin.Api/Models/SyncPlayDtos/SeekRequestDto.cs (67%) rename MediaBrowser.Model/SyncPlay/RequestBodies/SetPlaylistItemRequestBody.cs => Jellyfin.Api/Models/SyncPlayDtos/SetPlaylistItemRequestDto.cs (68%) rename MediaBrowser.Model/SyncPlay/RequestBodies/SetRepeatModeRequestBody.cs => Jellyfin.Api/Models/SyncPlayDtos/SetRepeatModeRequestDto.cs (59%) rename MediaBrowser.Model/SyncPlay/RequestBodies/SetShuffleModeRequestBody.cs => Jellyfin.Api/Models/SyncPlayDtos/SetShuffleModeRequestDto.cs (59%) diff --git a/Jellyfin.Api/Controllers/SyncPlayController.cs b/Jellyfin.Api/Controllers/SyncPlayController.cs index f8bbed9c42..32e020c8ae 100644 --- a/Jellyfin.Api/Controllers/SyncPlayController.cs +++ b/Jellyfin.Api/Controllers/SyncPlayController.cs @@ -4,13 +4,13 @@ using System.ComponentModel.DataAnnotations; using System.Threading; using Jellyfin.Api.Constants; using Jellyfin.Api.Helpers; +using Jellyfin.Api.Models.SyncPlayDtos; using MediaBrowser.Controller.Net; using MediaBrowser.Controller.Session; using MediaBrowser.Controller.SyncPlay; using MediaBrowser.Controller.SyncPlay.PlaybackRequests; using MediaBrowser.Controller.SyncPlay.Requests; using MediaBrowser.Model.SyncPlay; -using MediaBrowser.Model.SyncPlay.RequestBodies; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; @@ -53,7 +53,7 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status204NoContent)] [Authorize(Policy = Policies.SyncPlayCreateGroupAccess)] public ActionResult SyncPlayCreateGroup( - [FromBody, Required] NewGroupRequestBody requestData) + [FromBody, Required] NewGroupRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new NewGroupRequest(requestData.GroupName); @@ -70,7 +70,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("Join")] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SyncPlayJoinGroup( - [FromBody, Required] JoinGroupRequestBody requestData) + [FromBody, Required] JoinGroupRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new JoinGroupRequest(requestData.GroupId); @@ -116,7 +116,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("SetNewQueue")] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SyncPlaySetNewQueue( - [FromBody, Required] PlayRequestBody requestData) + [FromBody, Required] PlayRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new PlayGroupRequest( @@ -136,7 +136,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("SetPlaylistItem")] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SyncPlaySetPlaylistItem( - [FromBody, Required] SetPlaylistItemRequestBody requestData) + [FromBody, Required] SetPlaylistItemRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new SetPlaylistItemGroupRequest(requestData.PlaylistItemId); @@ -153,7 +153,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("RemoveFromPlaylist")] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SyncPlayRemoveFromPlaylist( - [FromBody, Required] RemoveFromPlaylistRequestBody requestData) + [FromBody, Required] RemoveFromPlaylistRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new RemoveFromPlaylistGroupRequest(requestData.PlaylistItemIds); @@ -170,7 +170,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("MovePlaylistItem")] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SyncPlayMovePlaylistItem( - [FromBody, Required] MovePlaylistItemRequestBody requestData) + [FromBody, Required] MovePlaylistItemRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new MovePlaylistItemGroupRequest(requestData.PlaylistItemId, requestData.NewIndex); @@ -187,7 +187,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("Queue")] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SyncPlayQueue( - [FromBody, Required] QueueRequestBody requestData) + [FromBody, Required] QueueRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new QueueGroupRequest(requestData.ItemIds, requestData.Mode); @@ -249,7 +249,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("Seek")] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SyncPlaySeek( - [FromBody, Required] SeekRequestBody requestData) + [FromBody, Required] SeekRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new SeekGroupRequest(requestData.PositionTicks); @@ -266,7 +266,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("Buffering")] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SyncPlayBuffering( - [FromBody, Required] BufferRequestBody requestData) + [FromBody, Required] BufferRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new BufferGroupRequest( @@ -287,7 +287,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("Ready")] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SyncPlayReady( - [FromBody, Required] ReadyRequestBody requestData) + [FromBody, Required] ReadyRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new ReadyGroupRequest( @@ -308,7 +308,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("SetIgnoreWait")] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SyncPlaySetIgnoreWait( - [FromBody, Required] IgnoreWaitRequestBody requestData) + [FromBody, Required] IgnoreWaitRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new IgnoreWaitGroupRequest(requestData.IgnoreWait); @@ -325,7 +325,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("NextItem")] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SyncPlayNextItem( - [FromBody, Required] NextItemRequestBody requestData) + [FromBody, Required] NextItemRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new NextItemGroupRequest(requestData.PlaylistItemId); @@ -342,7 +342,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("PreviousItem")] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SyncPlayPreviousItem( - [FromBody, Required] PreviousItemRequestBody requestData) + [FromBody, Required] PreviousItemRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new PreviousItemGroupRequest(requestData.PlaylistItemId); @@ -359,7 +359,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("SetRepeatMode")] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SyncPlaySetRepeatMode( - [FromBody, Required] SetRepeatModeRequestBody requestData) + [FromBody, Required] SetRepeatModeRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new SetRepeatModeGroupRequest(requestData.Mode); @@ -376,7 +376,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("SetShuffleMode")] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SyncPlaySetShuffleMode( - [FromBody, Required] SetShuffleModeRequestBody requestData) + [FromBody, Required] SetShuffleModeRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new SetShuffleModeGroupRequest(requestData.Mode); @@ -393,7 +393,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("Ping")] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SyncPlayPing( - [FromBody, Required] PingRequestBody requestData) + [FromBody, Required] PingRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new PingGroupRequest(requestData.Ping); diff --git a/MediaBrowser.Model/SyncPlay/RequestBodies/BufferRequestBody.cs b/Jellyfin.Api/Models/SyncPlayDtos/BufferRequestDto.cs similarity index 86% rename from MediaBrowser.Model/SyncPlay/RequestBodies/BufferRequestBody.cs rename to Jellyfin.Api/Models/SyncPlayDtos/BufferRequestDto.cs index 09ca712e51..cafc400c9c 100644 --- a/MediaBrowser.Model/SyncPlay/RequestBodies/BufferRequestBody.cs +++ b/Jellyfin.Api/Models/SyncPlayDtos/BufferRequestDto.cs @@ -1,16 +1,16 @@ using System; -namespace MediaBrowser.Model.SyncPlay.RequestBodies +namespace Jellyfin.Api.Models.SyncPlayDtos { /// - /// Class BufferRequestBody. + /// Class BufferRequestDto. /// - public class BufferRequestBody + public class BufferRequestDto { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public BufferRequestBody() + public BufferRequestDto() { PlaylistItemId = string.Empty; } diff --git a/MediaBrowser.Model/SyncPlay/RequestBodies/IgnoreWaitRequestBody.cs b/Jellyfin.Api/Models/SyncPlayDtos/IgnoreWaitRequestDto.cs similarity index 68% rename from MediaBrowser.Model/SyncPlay/RequestBodies/IgnoreWaitRequestBody.cs rename to Jellyfin.Api/Models/SyncPlayDtos/IgnoreWaitRequestDto.cs index 22407e88ed..4c30b7be43 100644 --- a/MediaBrowser.Model/SyncPlay/RequestBodies/IgnoreWaitRequestBody.cs +++ b/Jellyfin.Api/Models/SyncPlayDtos/IgnoreWaitRequestDto.cs @@ -1,9 +1,9 @@ -namespace MediaBrowser.Model.SyncPlay.RequestBodies +namespace Jellyfin.Api.Models.SyncPlayDtos { /// - /// Class IgnoreWaitRequestBody. + /// Class IgnoreWaitRequestDto. /// - public class IgnoreWaitRequestBody + public class IgnoreWaitRequestDto { /// /// Gets or sets a value indicating whether the client should be ignored. diff --git a/MediaBrowser.Model/SyncPlay/RequestBodies/JoinGroupRequestBody.cs b/Jellyfin.Api/Models/SyncPlayDtos/JoinGroupRequestDto.cs similarity index 67% rename from MediaBrowser.Model/SyncPlay/RequestBodies/JoinGroupRequestBody.cs rename to Jellyfin.Api/Models/SyncPlayDtos/JoinGroupRequestDto.cs index 2cec7bdc21..ed97b8d6a5 100644 --- a/MediaBrowser.Model/SyncPlay/RequestBodies/JoinGroupRequestBody.cs +++ b/Jellyfin.Api/Models/SyncPlayDtos/JoinGroupRequestDto.cs @@ -1,11 +1,11 @@ using System; -namespace MediaBrowser.Model.SyncPlay.RequestBodies +namespace Jellyfin.Api.Models.SyncPlayDtos { /// - /// Class JoinGroupRequestBody. + /// Class JoinGroupRequestDto. /// - public class JoinGroupRequestBody + public class JoinGroupRequestDto { /// /// Gets or sets the group identifier. diff --git a/MediaBrowser.Model/SyncPlay/RequestBodies/MovePlaylistItemRequestBody.cs b/Jellyfin.Api/Models/SyncPlayDtos/MovePlaylistItemRequestDto.cs similarity index 74% rename from MediaBrowser.Model/SyncPlay/RequestBodies/MovePlaylistItemRequestBody.cs rename to Jellyfin.Api/Models/SyncPlayDtos/MovePlaylistItemRequestDto.cs index d18eb68ffe..9e9c0b1eab 100644 --- a/MediaBrowser.Model/SyncPlay/RequestBodies/MovePlaylistItemRequestBody.cs +++ b/Jellyfin.Api/Models/SyncPlayDtos/MovePlaylistItemRequestDto.cs @@ -1,14 +1,14 @@ -namespace MediaBrowser.Model.SyncPlay.RequestBodies +namespace Jellyfin.Api.Models.SyncPlayDtos { /// - /// Class MovePlaylistItemRequestBody. + /// Class MovePlaylistItemRequestDto. /// - public class MovePlaylistItemRequestBody + public class MovePlaylistItemRequestDto { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public MovePlaylistItemRequestBody() + public MovePlaylistItemRequestDto() { PlaylistItemId = string.Empty; } diff --git a/MediaBrowser.Model/SyncPlay/RequestBodies/NewGroupRequestBody.cs b/Jellyfin.Api/Models/SyncPlayDtos/NewGroupRequestDto.cs similarity index 68% rename from MediaBrowser.Model/SyncPlay/RequestBodies/NewGroupRequestBody.cs rename to Jellyfin.Api/Models/SyncPlayDtos/NewGroupRequestDto.cs index 1a85d276b9..441d7be367 100644 --- a/MediaBrowser.Model/SyncPlay/RequestBodies/NewGroupRequestBody.cs +++ b/Jellyfin.Api/Models/SyncPlayDtos/NewGroupRequestDto.cs @@ -1,14 +1,14 @@ -namespace MediaBrowser.Model.SyncPlay.RequestBodies +namespace Jellyfin.Api.Models.SyncPlayDtos { /// - /// Class NewGroupRequestBody. + /// Class NewGroupRequestDto. /// - public class NewGroupRequestBody + public class NewGroupRequestDto { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public NewGroupRequestBody() + public NewGroupRequestDto() { GroupName = string.Empty; } diff --git a/MediaBrowser.Model/SyncPlay/RequestBodies/NextItemRequestBody.cs b/Jellyfin.Api/Models/SyncPlayDtos/NextItemRequestDto.cs similarity index 70% rename from MediaBrowser.Model/SyncPlay/RequestBodies/NextItemRequestBody.cs rename to Jellyfin.Api/Models/SyncPlayDtos/NextItemRequestDto.cs index 39ce75dc19..aa67954e75 100644 --- a/MediaBrowser.Model/SyncPlay/RequestBodies/NextItemRequestBody.cs +++ b/Jellyfin.Api/Models/SyncPlayDtos/NextItemRequestDto.cs @@ -1,14 +1,14 @@ -namespace MediaBrowser.Model.SyncPlay.RequestBodies +namespace Jellyfin.Api.Models.SyncPlayDtos { /// - /// Class NextItemRequestBody. + /// Class NextItemRequestDto. /// - public class NextItemRequestBody + public class NextItemRequestDto { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public NextItemRequestBody() + public NextItemRequestDto() { PlaylistItemId = string.Empty; } diff --git a/MediaBrowser.Model/SyncPlay/RequestBodies/PingRequestBody.cs b/Jellyfin.Api/Models/SyncPlayDtos/PingRequestDto.cs similarity index 65% rename from MediaBrowser.Model/SyncPlay/RequestBodies/PingRequestBody.cs rename to Jellyfin.Api/Models/SyncPlayDtos/PingRequestDto.cs index f08015bc46..c4ac068565 100644 --- a/MediaBrowser.Model/SyncPlay/RequestBodies/PingRequestBody.cs +++ b/Jellyfin.Api/Models/SyncPlayDtos/PingRequestDto.cs @@ -1,9 +1,9 @@ -namespace MediaBrowser.Model.SyncPlay.RequestBodies +namespace Jellyfin.Api.Models.SyncPlayDtos { /// - /// Class PingRequestBody. + /// Class PingRequestDto. /// - public class PingRequestBody + public class PingRequestDto { /// /// Gets or sets the ping time. diff --git a/MediaBrowser.Model/SyncPlay/RequestBodies/PlayRequestBody.cs b/Jellyfin.Api/Models/SyncPlayDtos/PlayRequestDto.cs similarity index 84% rename from MediaBrowser.Model/SyncPlay/RequestBodies/PlayRequestBody.cs rename to Jellyfin.Api/Models/SyncPlayDtos/PlayRequestDto.cs index 97ec95c624..844388cd99 100644 --- a/MediaBrowser.Model/SyncPlay/RequestBodies/PlayRequestBody.cs +++ b/Jellyfin.Api/Models/SyncPlayDtos/PlayRequestDto.cs @@ -1,17 +1,17 @@ using System; using System.Collections.Generic; -namespace MediaBrowser.Model.SyncPlay.RequestBodies +namespace Jellyfin.Api.Models.SyncPlayDtos { /// - /// Class PlayRequestBody. + /// Class PlayRequestDto. /// - public class PlayRequestBody + public class PlayRequestDto { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public PlayRequestBody() + public PlayRequestDto() { PlayingQueue = Array.Empty(); } diff --git a/MediaBrowser.Model/SyncPlay/RequestBodies/PreviousItemRequestBody.cs b/Jellyfin.Api/Models/SyncPlayDtos/PreviousItemRequestDto.cs similarity index 68% rename from MediaBrowser.Model/SyncPlay/RequestBodies/PreviousItemRequestBody.cs rename to Jellyfin.Api/Models/SyncPlayDtos/PreviousItemRequestDto.cs index 671a7291ce..b23d4dee0a 100644 --- a/MediaBrowser.Model/SyncPlay/RequestBodies/PreviousItemRequestBody.cs +++ b/Jellyfin.Api/Models/SyncPlayDtos/PreviousItemRequestDto.cs @@ -1,14 +1,14 @@ -namespace MediaBrowser.Model.SyncPlay.RequestBodies +namespace Jellyfin.Api.Models.SyncPlayDtos { /// - /// Class PreviousItemRequestBody. + /// Class PreviousItemRequestDto. /// - public class PreviousItemRequestBody + public class PreviousItemRequestDto { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public PreviousItemRequestBody() + public PreviousItemRequestDto() { PlaylistItemId = string.Empty; } diff --git a/MediaBrowser.Model/SyncPlay/RequestBodies/QueueRequestBody.cs b/Jellyfin.Api/Models/SyncPlayDtos/QueueRequestDto.cs similarity index 77% rename from MediaBrowser.Model/SyncPlay/RequestBodies/QueueRequestBody.cs rename to Jellyfin.Api/Models/SyncPlayDtos/QueueRequestDto.cs index 1afc61dd46..2b187f443f 100644 --- a/MediaBrowser.Model/SyncPlay/RequestBodies/QueueRequestBody.cs +++ b/Jellyfin.Api/Models/SyncPlayDtos/QueueRequestDto.cs @@ -1,17 +1,18 @@ using System; using System.Collections.Generic; +using MediaBrowser.Model.SyncPlay; -namespace MediaBrowser.Model.SyncPlay.RequestBodies +namespace Jellyfin.Api.Models.SyncPlayDtos { /// - /// Class QueueRequestBody. + /// Class QueueRequestDto. /// - public class QueueRequestBody + public class QueueRequestDto { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public QueueRequestBody() + public QueueRequestDto() { ItemIds = Array.Empty(); } diff --git a/MediaBrowser.Model/SyncPlay/RequestBodies/ReadyRequestBody.cs b/Jellyfin.Api/Models/SyncPlayDtos/ReadyRequestDto.cs similarity index 88% rename from MediaBrowser.Model/SyncPlay/RequestBodies/ReadyRequestBody.cs rename to Jellyfin.Api/Models/SyncPlayDtos/ReadyRequestDto.cs index 359186e781..0155d52495 100644 --- a/MediaBrowser.Model/SyncPlay/RequestBodies/ReadyRequestBody.cs +++ b/Jellyfin.Api/Models/SyncPlayDtos/ReadyRequestDto.cs @@ -1,16 +1,16 @@ using System; -namespace MediaBrowser.Model.SyncPlay.RequestBodies +namespace Jellyfin.Api.Models.SyncPlayDtos { /// /// Class ReadyRequest. /// - public class ReadyRequestBody + public class ReadyRequestDto { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public ReadyRequestBody() + public ReadyRequestDto() { PlaylistItemId = string.Empty; } diff --git a/MediaBrowser.Model/SyncPlay/RequestBodies/RemoveFromPlaylistRequestBody.cs b/Jellyfin.Api/Models/SyncPlayDtos/RemoveFromPlaylistRequestDto.cs similarity index 70% rename from MediaBrowser.Model/SyncPlay/RequestBodies/RemoveFromPlaylistRequestBody.cs rename to Jellyfin.Api/Models/SyncPlayDtos/RemoveFromPlaylistRequestDto.cs index a2b617cd03..facb809fca 100644 --- a/MediaBrowser.Model/SyncPlay/RequestBodies/RemoveFromPlaylistRequestBody.cs +++ b/Jellyfin.Api/Models/SyncPlayDtos/RemoveFromPlaylistRequestDto.cs @@ -1,17 +1,17 @@ using System; using System.Collections.Generic; -namespace MediaBrowser.Model.SyncPlay.RequestBodies +namespace Jellyfin.Api.Models.SyncPlayDtos { /// - /// Class RemoveFromPlaylistRequestBody. + /// Class RemoveFromPlaylistRequestDto. /// - public class RemoveFromPlaylistRequestBody + public class RemoveFromPlaylistRequestDto { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public RemoveFromPlaylistRequestBody() + public RemoveFromPlaylistRequestDto() { PlaylistItemIds = Array.Empty(); } diff --git a/MediaBrowser.Model/SyncPlay/RequestBodies/SeekRequestBody.cs b/Jellyfin.Api/Models/SyncPlayDtos/SeekRequestDto.cs similarity index 67% rename from MediaBrowser.Model/SyncPlay/RequestBodies/SeekRequestBody.cs rename to Jellyfin.Api/Models/SyncPlayDtos/SeekRequestDto.cs index 689183bb6a..b9af0be7ff 100644 --- a/MediaBrowser.Model/SyncPlay/RequestBodies/SeekRequestBody.cs +++ b/Jellyfin.Api/Models/SyncPlayDtos/SeekRequestDto.cs @@ -1,9 +1,9 @@ -namespace MediaBrowser.Model.SyncPlay.RequestBodies +namespace Jellyfin.Api.Models.SyncPlayDtos { /// - /// Class SeekRequestBody. + /// Class SeekRequestDto. /// - public class SeekRequestBody + public class SeekRequestDto { /// /// Gets or sets the position ticks. diff --git a/MediaBrowser.Model/SyncPlay/RequestBodies/SetPlaylistItemRequestBody.cs b/Jellyfin.Api/Models/SyncPlayDtos/SetPlaylistItemRequestDto.cs similarity index 68% rename from MediaBrowser.Model/SyncPlay/RequestBodies/SetPlaylistItemRequestBody.cs rename to Jellyfin.Api/Models/SyncPlayDtos/SetPlaylistItemRequestDto.cs index abe66c479e..3440858712 100644 --- a/MediaBrowser.Model/SyncPlay/RequestBodies/SetPlaylistItemRequestBody.cs +++ b/Jellyfin.Api/Models/SyncPlayDtos/SetPlaylistItemRequestDto.cs @@ -1,14 +1,14 @@ -namespace MediaBrowser.Model.SyncPlay.RequestBodies +namespace Jellyfin.Api.Models.SyncPlayDtos { /// - /// Class SetPlaylistItemRequestBody. + /// Class SetPlaylistItemRequestDto. /// - public class SetPlaylistItemRequestBody + public class SetPlaylistItemRequestDto { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public SetPlaylistItemRequestBody() + public SetPlaylistItemRequestDto() { PlaylistItemId = string.Empty; } diff --git a/MediaBrowser.Model/SyncPlay/RequestBodies/SetRepeatModeRequestBody.cs b/Jellyfin.Api/Models/SyncPlayDtos/SetRepeatModeRequestDto.cs similarity index 59% rename from MediaBrowser.Model/SyncPlay/RequestBodies/SetRepeatModeRequestBody.cs rename to Jellyfin.Api/Models/SyncPlayDtos/SetRepeatModeRequestDto.cs index 6de5415cae..e748fc3e0f 100644 --- a/MediaBrowser.Model/SyncPlay/RequestBodies/SetRepeatModeRequestBody.cs +++ b/Jellyfin.Api/Models/SyncPlayDtos/SetRepeatModeRequestDto.cs @@ -1,9 +1,11 @@ -namespace MediaBrowser.Model.SyncPlay.RequestBodies +using MediaBrowser.Model.SyncPlay; + +namespace Jellyfin.Api.Models.SyncPlayDtos { /// - /// Class SetRepeatModeRequestBody. + /// Class SetRepeatModeRequestDto. /// - public class SetRepeatModeRequestBody + public class SetRepeatModeRequestDto { /// /// Gets or sets the repeat mode. diff --git a/MediaBrowser.Model/SyncPlay/RequestBodies/SetShuffleModeRequestBody.cs b/Jellyfin.Api/Models/SyncPlayDtos/SetShuffleModeRequestDto.cs similarity index 59% rename from MediaBrowser.Model/SyncPlay/RequestBodies/SetShuffleModeRequestBody.cs rename to Jellyfin.Api/Models/SyncPlayDtos/SetShuffleModeRequestDto.cs index 867cb938dc..0e427f4a4d 100644 --- a/MediaBrowser.Model/SyncPlay/RequestBodies/SetShuffleModeRequestBody.cs +++ b/Jellyfin.Api/Models/SyncPlayDtos/SetShuffleModeRequestDto.cs @@ -1,9 +1,11 @@ -namespace MediaBrowser.Model.SyncPlay.RequestBodies +using MediaBrowser.Model.SyncPlay; + +namespace Jellyfin.Api.Models.SyncPlayDtos { /// - /// Class SetShuffleModeRequestBody. + /// Class SetShuffleModeRequestDto. /// - public class SetShuffleModeRequestBody + public class SetShuffleModeRequestDto { /// /// Gets or sets the shuffle mode. diff --git a/MediaBrowser.Controller/SyncPlay/ISyncPlayManager.cs b/MediaBrowser.Controller/SyncPlay/ISyncPlayManager.cs index 146e4351df..d0244563a4 100644 --- a/MediaBrowser.Controller/SyncPlay/ISyncPlayManager.cs +++ b/MediaBrowser.Controller/SyncPlay/ISyncPlayManager.cs @@ -4,7 +4,6 @@ using System.Threading; using MediaBrowser.Controller.Session; using MediaBrowser.Controller.SyncPlay.Requests; using MediaBrowser.Model.SyncPlay; -using MediaBrowser.Model.SyncPlay.RequestBodies; namespace MediaBrowser.Controller.SyncPlay {