mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-07 06:43:26 +01:00
Rewrite syncplay using a state design pattern
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System.Threading;
|
||||
using MediaBrowser.Model.SyncPlay;
|
||||
using MediaBrowser.Controller.Session;
|
||||
|
||||
namespace MediaBrowser.Controller.SyncPlay
|
||||
{
|
||||
/// <summary>
|
||||
/// Class PauseGroupRequest.
|
||||
/// </summary>
|
||||
public class PauseGroupRequest : IPlaybackGroupRequest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public PlaybackRequestType Type()
|
||||
{
|
||||
return PlaybackRequestType.Pause;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Apply(ISyncPlayStateContext context, ISyncPlayState state, SessionInfo session, CancellationToken cancellationToken)
|
||||
{
|
||||
return state.HandleRequest(context, false, this, session, cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user