diff --git a/Emby.Server.Implementations/SyncPlay/Group.cs b/Emby.Server.Implementations/SyncPlay/Group.cs
index b5031b708b..7c2ad2477a 100644
--- a/Emby.Server.Implementations/SyncPlay/Group.cs
+++ b/Emby.Server.Implementations/SyncPlay/Group.cs
@@ -332,6 +332,16 @@ namespace Emby.Server.Implementations.SyncPlay
// and notify clients of state changes. The actual syncing of media playback
// happens client side. Clients are aware of the server's time and use it to sync.
_logger.LogInformation("Session {SessionId} requested {RequestType} in group {GroupId} that is {StateType}.", session.Id, request.Action, GroupId.ToString(), _state.Type);
+
+ // Apply requested changes to this group given its current state.
+ // Every request has a slightly different outcome depending on the group's state.
+ // There are currently four different group states that accomplish different goals:
+ // - Idle: in this state no media is playing and clients should be idle (playback is stopped).
+ // - Waiting: in this state the group is waiting for all the clients to be ready to start the playback,
+ // that is, they've either finished loading the media for the first time or they've finished buffering.
+ // Once all clients report to be ready the group's state can change to Playing or Paused.
+ // - Playing: clients have some media loaded and playback is unpaused.
+ // - Paused: clients have some media loaded but playback is currently paused.
request.Apply(this, _state, session, cancellationToken);
}
diff --git a/Emby.Server.Implementations/SyncPlay/SyncPlayManager.cs b/Emby.Server.Implementations/SyncPlay/SyncPlayManager.cs
index e43f5c2c31..348213ee15 100644
--- a/Emby.Server.Implementations/SyncPlay/SyncPlayManager.cs
+++ b/Emby.Server.Implementations/SyncPlay/SyncPlayManager.cs
@@ -305,6 +305,7 @@ namespace Emby.Server.Implementations.SyncPlay
return;
}
+ // Apply requested changes to group.
group.HandleRequest(session, request, cancellationToken);
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/GroupStates/AbstractGroupState.cs b/MediaBrowser.Controller/SyncPlay/GroupStates/AbstractGroupState.cs
index 5e3d4a2528..e3de22db38 100644
--- a/MediaBrowser.Controller/SyncPlay/GroupStates/AbstractGroupState.cs
+++ b/MediaBrowser.Controller/SyncPlay/GroupStates/AbstractGroupState.cs
@@ -44,27 +44,27 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
public abstract void SessionLeaving(IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, IGroupPlaybackRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(IGroupPlaybackRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
UnhandledRequest(request);
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, PlayGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(PlayGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
UnhandledRequest(request);
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, SetPlaylistItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(SetPlaylistItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
var waitingState = new WaitingGroupState(LoggerFactory);
context.SetState(waitingState);
- waitingState.HandleRequest(context, Type, request, session, cancellationToken);
+ waitingState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, RemoveFromPlaylistGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(RemoveFromPlaylistGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
var playingItemRemoved = context.RemoveFromPlayQueue(request.PlaylistItemIds);
@@ -79,12 +79,12 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
IGroupState idleState = new IdleGroupState(LoggerFactory);
context.SetState(idleState);
var stopRequest = new StopGroupRequest();
- idleState.HandleRequest(context, Type, stopRequest, session, cancellationToken);
+ idleState.HandleRequest(stopRequest, context, Type, session, cancellationToken);
}
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, MovePlaylistItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(MovePlaylistItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
var result = context.MoveItemInPlayQueue(request.PlaylistItemId, request.NewIndex);
@@ -100,7 +100,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, QueueGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(QueueGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
var result = context.AddToPlayQueue(request.ItemIds, request.Mode);
@@ -121,55 +121,55 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, UnpauseGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(UnpauseGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
UnhandledRequest(request);
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, PauseGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(PauseGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
UnhandledRequest(request);
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, StopGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(StopGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
UnhandledRequest(request);
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, SeekGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(SeekGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
UnhandledRequest(request);
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, BufferGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(BufferGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
UnhandledRequest(request);
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, ReadyGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(ReadyGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
UnhandledRequest(request);
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(NextItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
UnhandledRequest(request);
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(PreviousItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
UnhandledRequest(request);
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, SetRepeatModeGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(SetRepeatModeGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
context.SetRepeatMode(request.Mode);
var playQueueUpdate = context.GetPlayQueueUpdate(PlayQueueUpdateReason.RepeatMode);
@@ -178,7 +178,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, SetShuffleModeGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(SetShuffleModeGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
context.SetShuffleMode(request.Mode);
var playQueueUpdate = context.GetPlayQueueUpdate(PlayQueueUpdateReason.ShuffleMode);
@@ -187,14 +187,14 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, PingGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(PingGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Collected pings are used to account for network latency when unpausing playback.
context.UpdatePing(session, request.Ping);
}
///
- public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, IgnoreWaitGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public virtual void HandleRequest(IgnoreWaitGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
context.SetIgnoreGroupWait(session, request.IgnoreWait);
}
diff --git a/MediaBrowser.Controller/SyncPlay/GroupStates/IdleGroupState.cs b/MediaBrowser.Controller/SyncPlay/GroupStates/IdleGroupState.cs
index 8074d5a96b..12ce6c8f82 100644
--- a/MediaBrowser.Controller/SyncPlay/GroupStates/IdleGroupState.cs
+++ b/MediaBrowser.Controller/SyncPlay/GroupStates/IdleGroupState.cs
@@ -45,69 +45,69 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PlayGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(PlayGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var waitingState = new WaitingGroupState(LoggerFactory);
context.SetState(waitingState);
- waitingState.HandleRequest(context, Type, request, session, cancellationToken);
+ waitingState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, UnpauseGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(UnpauseGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var waitingState = new WaitingGroupState(LoggerFactory);
context.SetState(waitingState);
- waitingState.HandleRequest(context, Type, request, session, cancellationToken);
+ waitingState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PauseGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(PauseGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
SendStopCommand(context, prevState, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, StopGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(StopGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
SendStopCommand(context, prevState, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, SeekGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(SeekGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
SendStopCommand(context, prevState, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, BufferGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(BufferGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
SendStopCommand(context, prevState, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, ReadyGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(ReadyGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
SendStopCommand(context, prevState, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(NextItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var waitingState = new WaitingGroupState(LoggerFactory);
context.SetState(waitingState);
- waitingState.HandleRequest(context, Type, request, session, cancellationToken);
+ waitingState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(PreviousItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var waitingState = new WaitingGroupState(LoggerFactory);
context.SetState(waitingState);
- waitingState.HandleRequest(context, Type, request, session, cancellationToken);
+ waitingState.HandleRequest(request, context, Type, session, cancellationToken);
}
private void SendStopCommand(IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
diff --git a/MediaBrowser.Controller/SyncPlay/GroupStates/PausedGroupState.cs b/MediaBrowser.Controller/SyncPlay/GroupStates/PausedGroupState.cs
index 28e5db950d..fba8ba9e2e 100644
--- a/MediaBrowser.Controller/SyncPlay/GroupStates/PausedGroupState.cs
+++ b/MediaBrowser.Controller/SyncPlay/GroupStates/PausedGroupState.cs
@@ -49,25 +49,25 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PlayGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(PlayGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var waitingState = new WaitingGroupState(LoggerFactory);
context.SetState(waitingState);
- waitingState.HandleRequest(context, Type, request, session, cancellationToken);
+ waitingState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, UnpauseGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(UnpauseGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var playingState = new PlayingGroupState(LoggerFactory);
context.SetState(playingState);
- playingState.HandleRequest(context, Type, request, session, cancellationToken);
+ playingState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PauseGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(PauseGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
if (!prevState.Equals(Type))
{
@@ -98,34 +98,34 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, StopGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(StopGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var idleState = new IdleGroupState(LoggerFactory);
context.SetState(idleState);
- idleState.HandleRequest(context, Type, request, session, cancellationToken);
+ idleState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, SeekGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(SeekGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var waitingState = new WaitingGroupState(LoggerFactory);
context.SetState(waitingState);
- waitingState.HandleRequest(context, Type, request, session, cancellationToken);
+ waitingState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, BufferGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(BufferGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var waitingState = new WaitingGroupState(LoggerFactory);
context.SetState(waitingState);
- waitingState.HandleRequest(context, Type, request, session, cancellationToken);
+ waitingState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, ReadyGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(ReadyGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
if (prevState.Equals(Type))
{
@@ -145,21 +145,21 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(NextItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var waitingState = new WaitingGroupState(LoggerFactory);
context.SetState(waitingState);
- waitingState.HandleRequest(context, Type, request, session, cancellationToken);
+ waitingState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(PreviousItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var waitingState = new WaitingGroupState(LoggerFactory);
context.SetState(waitingState);
- waitingState.HandleRequest(context, Type, request, session, cancellationToken);
+ waitingState.HandleRequest(request, context, Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/GroupStates/PlayingGroupState.cs b/MediaBrowser.Controller/SyncPlay/GroupStates/PlayingGroupState.cs
index 278a0af084..9797b247ce 100644
--- a/MediaBrowser.Controller/SyncPlay/GroupStates/PlayingGroupState.cs
+++ b/MediaBrowser.Controller/SyncPlay/GroupStates/PlayingGroupState.cs
@@ -54,16 +54,16 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PlayGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(PlayGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var waitingState = new WaitingGroupState(LoggerFactory);
context.SetState(waitingState);
- waitingState.HandleRequest(context, Type, request, session, cancellationToken);
+ waitingState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, UnpauseGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(UnpauseGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
if (!prevState.Equals(Type))
{
@@ -91,34 +91,34 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PauseGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(PauseGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var pausedState = new PausedGroupState(LoggerFactory);
context.SetState(pausedState);
- pausedState.HandleRequest(context, Type, request, session, cancellationToken);
+ pausedState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, StopGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(StopGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var idleState = new IdleGroupState(LoggerFactory);
context.SetState(idleState);
- idleState.HandleRequest(context, Type, request, session, cancellationToken);
+ idleState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, SeekGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(SeekGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var waitingState = new WaitingGroupState(LoggerFactory);
context.SetState(waitingState);
- waitingState.HandleRequest(context, Type, request, session, cancellationToken);
+ waitingState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, BufferGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(BufferGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
if (IgnoreBuffering)
{
@@ -128,11 +128,11 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
// Change state.
var waitingState = new WaitingGroupState(LoggerFactory);
context.SetState(waitingState);
- waitingState.HandleRequest(context, Type, request, session, cancellationToken);
+ waitingState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, ReadyGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(ReadyGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
if (prevState.Equals(Type))
{
@@ -148,21 +148,21 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(NextItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var waitingState = new WaitingGroupState(LoggerFactory);
context.SetState(waitingState);
- waitingState.HandleRequest(context, Type, request, session, cancellationToken);
+ waitingState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(PreviousItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Change state.
var waitingState = new WaitingGroupState(LoggerFactory);
context.SetState(waitingState);
- waitingState.HandleRequest(context, Type, request, session, cancellationToken);
+ waitingState.HandleRequest(request, context, Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/GroupStates/WaitingGroupState.cs b/MediaBrowser.Controller/SyncPlay/GroupStates/WaitingGroupState.cs
index c2820604f3..507573653f 100644
--- a/MediaBrowser.Controller/SyncPlay/GroupStates/WaitingGroupState.cs
+++ b/MediaBrowser.Controller/SyncPlay/GroupStates/WaitingGroupState.cs
@@ -108,7 +108,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
var playingState = new PlayingGroupState(LoggerFactory);
context.SetState(playingState);
var unpauseRequest = new UnpauseGroupRequest();
- playingState.HandleRequest(context, Type, unpauseRequest, session, cancellationToken);
+ playingState.HandleRequest(unpauseRequest, context, Type, session, cancellationToken);
}
else
{
@@ -122,7 +122,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PlayGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(PlayGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Save state if first event.
if (!InitialStateSet)
@@ -160,7 +160,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, SetPlaylistItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(SetPlaylistItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Save state if first event.
if (!InitialStateSet)
@@ -198,7 +198,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, UnpauseGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(UnpauseGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Save state if first event.
if (!InitialStateSet)
@@ -236,7 +236,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
IgnoreBuffering = true
};
context.SetState(playingState);
- playingState.HandleRequest(context, Type, request, session, cancellationToken);
+ playingState.HandleRequest(request, context, Type, session, cancellationToken);
}
else
{
@@ -250,7 +250,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PauseGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(PauseGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Save state if first event.
if (!InitialStateSet)
@@ -267,7 +267,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, StopGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(StopGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Save state if first event.
if (!InitialStateSet)
@@ -279,11 +279,11 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
// Change state.
var idleState = new IdleGroupState(LoggerFactory);
context.SetState(idleState);
- idleState.HandleRequest(context, Type, request, session, cancellationToken);
+ idleState.HandleRequest(request, context, Type, session, cancellationToken);
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, SeekGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(SeekGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Save state if first event.
if (!InitialStateSet)
@@ -319,7 +319,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, BufferGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(BufferGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Save state if first event.
if (!InitialStateSet)
@@ -393,7 +393,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, ReadyGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(ReadyGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Save state if first event.
if (!InitialStateSet)
@@ -511,7 +511,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
// Change state.
var playingState = new PlayingGroupState(LoggerFactory);
context.SetState(playingState);
- playingState.HandleRequest(context, Type, request, session, cancellationToken);
+ playingState.HandleRequest(request, context, Type, session, cancellationToken);
}
}
else
@@ -548,19 +548,19 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
if (InitialState.Equals(GroupStateType.Playing))
{
// Group went from playing to waiting state and a pause request occured while waiting.
- var pauserequest = new PauseGroupRequest();
- pausedState.HandleRequest(context, Type, pauserequest, session, cancellationToken);
+ var pauseRequest = new PauseGroupRequest();
+ pausedState.HandleRequest(pauseRequest, context, Type, session, cancellationToken);
}
else if (InitialState.Equals(GroupStateType.Paused))
{
- pausedState.HandleRequest(context, Type, request, session, cancellationToken);
+ pausedState.HandleRequest(request, context, Type, session, cancellationToken);
}
}
}
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(NextItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Save state if first event.
if (!InitialStateSet)
@@ -606,7 +606,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(PreviousItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
// Save state if first event.
if (!InitialStateSet)
@@ -652,7 +652,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
}
///
- public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, IgnoreWaitGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
+ public override void HandleRequest(IgnoreWaitGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken)
{
context.SetIgnoreGroupWait(session, request.IgnoreWait);
@@ -666,7 +666,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
var playingState = new PlayingGroupState(LoggerFactory);
context.SetState(playingState);
var unpauseRequest = new UnpauseGroupRequest();
- playingState.HandleRequest(context, Type, unpauseRequest, session, cancellationToken);
+ playingState.HandleRequest(unpauseRequest, context, Type, session, cancellationToken);
}
else
{
diff --git a/MediaBrowser.Controller/SyncPlay/IGroupState.cs b/MediaBrowser.Controller/SyncPlay/IGroupState.cs
index 89a8e2e2e7..95ee09985f 100644
--- a/MediaBrowser.Controller/SyncPlay/IGroupState.cs
+++ b/MediaBrowser.Controller/SyncPlay/IGroupState.cs
@@ -37,181 +37,181 @@ namespace MediaBrowser.Controller.SyncPlay
///
/// Generic handler. Context's state can change.
///
+ /// The generic request.
/// The context of the state.
/// The previous state.
- /// The generic request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, IGroupPlaybackRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(IGroupPlaybackRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a play request from a session. Context's state can change.
///
+ /// The play request.
/// The context of the state.
/// The previous state.
- /// The play request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, PlayGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(PlayGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a set-playlist-item request from a session. Context's state can change.
///
+ /// The set-playlist-item request.
/// The context of the state.
/// The previous state.
- /// The set-playlist-item request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, SetPlaylistItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(SetPlaylistItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a remove-items request from a session. Context's state can change.
///
+ /// The remove-items request.
/// The context of the state.
/// The previous state.
- /// The remove-items request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, RemoveFromPlaylistGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(RemoveFromPlaylistGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a move-playlist-item request from a session. Context's state should not change.
///
+ /// The move-playlist-item request.
/// The context of the state.
/// The previous state.
- /// The move-playlist-item request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, MovePlaylistItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(MovePlaylistItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a queue request from a session. Context's state should not change.
///
+ /// The queue request.
/// The context of the state.
/// The previous state.
- /// The queue request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, QueueGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(QueueGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles an unpause request from a session. Context's state can change.
///
+ /// The unpause request.
/// The context of the state.
/// The previous state.
- /// The unpause request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, UnpauseGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(UnpauseGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a pause request from a session. Context's state can change.
///
+ /// The pause request.
/// The context of the state.
/// The previous state.
- /// The pause request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, PauseGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(PauseGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a stop request from a session. Context's state can change.
///
+ /// The stop request.
/// The context of the state.
/// The previous state.
- /// The stop request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, StopGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(StopGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a seek request from a session. Context's state can change.
///
+ /// The seek request.
/// The context of the state.
/// The previous state.
- /// The seek request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, SeekGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(SeekGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a buffer request from a session. Context's state can change.
///
+ /// The buffer request.
/// The context of the state.
/// The previous state.
- /// The buffer request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, BufferGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(BufferGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a ready request from a session. Context's state can change.
///
+ /// The ready request.
/// The context of the state.
/// The previous state.
- /// The ready request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, ReadyGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(ReadyGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a next-item request from a session. Context's state can change.
///
+ /// The next-item request.
/// The context of the state.
/// The previous state.
- /// The next-item request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(NextItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a previous-item request from a session. Context's state can change.
///
+ /// The previous-item request.
/// The context of the state.
/// The previous state.
- /// The previous-item request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(PreviousItemGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a set-repeat-mode request from a session. Context's state should not change.
///
+ /// The repeat-mode request.
/// The context of the state.
/// The previous state.
- /// The repeat-mode request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, SetRepeatModeGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(SetRepeatModeGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a set-shuffle-mode request from a session. Context's state should not change.
///
+ /// The shuffle-mode request.
/// The context of the state.
/// The previous state.
- /// The shuffle-mode request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, SetShuffleModeGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(SetShuffleModeGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Updates the ping of a session. Context's state should not change.
///
+ /// The ping request.
/// The context of the state.
/// The previous state.
- /// The ping request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, PingGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(PingGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a ignore-wait request from a session. Context's state can change.
///
+ /// The ignore-wait request.
/// The context of the state.
/// The previous state.
- /// The ignore-wait request.
/// The session.
/// The cancellation token.
- void HandleRequest(IGroupStateContext context, GroupStateType prevState, IgnoreWaitGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
+ void HandleRequest(IgnoreWaitGroupRequest request, IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/BufferGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/BufferGroupRequest.cs
index 39e0ec2099..11cc99fcda 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/BufferGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/BufferGroupRequest.cs
@@ -55,7 +55,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/IgnoreWaitGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/IgnoreWaitGroupRequest.cs
index a375895ad0..64ef791ed7 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/IgnoreWaitGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/IgnoreWaitGroupRequest.cs
@@ -30,7 +30,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/MovePlaylistItemGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/MovePlaylistItemGroupRequest.cs
index 7ebf67af1d..9cd8da5668 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/MovePlaylistItemGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/MovePlaylistItemGroupRequest.cs
@@ -39,7 +39,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/NextItemGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/NextItemGroupRequest.cs
index 478414137c..e0ae0deb76 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/NextItemGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/NextItemGroupRequest.cs
@@ -31,7 +31,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/PauseGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/PauseGroupRequest.cs
index 8ce2b1fc80..2869b35f77 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/PauseGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/PauseGroupRequest.cs
@@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/PingGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/PingGroupRequest.cs
index 19c940cdf8..8ef3b20303 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/PingGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/PingGroupRequest.cs
@@ -30,7 +30,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/PlayGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/PlayGroupRequest.cs
index 88e0ebad2b..16f9b40874 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/PlayGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/PlayGroupRequest.cs
@@ -48,7 +48,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/PreviousItemGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/PreviousItemGroupRequest.cs
index ad3ea5e553..166ee08007 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/PreviousItemGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/PreviousItemGroupRequest.cs
@@ -31,7 +31,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/QueueGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/QueueGroupRequest.cs
index ba5e3e2327..d4af63b6d4 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/QueueGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/QueueGroupRequest.cs
@@ -40,7 +40,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/ReadyGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/ReadyGroupRequest.cs
index b2efcc97df..74f01cbeaf 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/ReadyGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/ReadyGroupRequest.cs
@@ -55,7 +55,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/RemoveFromPlaylistGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/RemoveFromPlaylistGroupRequest.cs
index 24009d93ca..47c06c2227 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/RemoveFromPlaylistGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/RemoveFromPlaylistGroupRequest.cs
@@ -32,7 +32,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/SeekGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/SeekGroupRequest.cs
index 41e28467c0..ecaa689ae3 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/SeekGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/SeekGroupRequest.cs
@@ -30,7 +30,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/SetPlaylistItemGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/SetPlaylistItemGroupRequest.cs
index 3edf9b8a42..c3451703ed 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/SetPlaylistItemGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/SetPlaylistItemGroupRequest.cs
@@ -31,7 +31,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/SetRepeatModeGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/SetRepeatModeGroupRequest.cs
index 6a5ec1d117..51011672ea 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/SetRepeatModeGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/SetRepeatModeGroupRequest.cs
@@ -30,7 +30,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/SetShuffleModeGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/SetShuffleModeGroupRequest.cs
index fe007c8d89..d7b2504b4b 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/SetShuffleModeGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/SetShuffleModeGroupRequest.cs
@@ -30,7 +30,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/StopGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/StopGroupRequest.cs
index c42e229d1f..ad739213c5 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/StopGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/StopGroupRequest.cs
@@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/UnpauseGroupRequest.cs b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/UnpauseGroupRequest.cs
index b4c1744e95..aaf3d65a84 100644
--- a/MediaBrowser.Controller/SyncPlay/PlaybackRequests/UnpauseGroupRequest.cs
+++ b/MediaBrowser.Controller/SyncPlay/PlaybackRequests/UnpauseGroupRequest.cs
@@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
///
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
- state.HandleRequest(context, state.Type, this, session, cancellationToken);
+ state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}