diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2020-05-26 20:00:01 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-26 20:00:01 -0400 |
| commit | 7c72f69189500ef491a0e81d8ce6788987f47fa3 (patch) | |
| tree | d8dbb903a3f1a1334f04d447ade715b102e8be99 /Emby.Server.Implementations/Session/SessionManager.cs | |
| parent | b33fa06efa1c7bf334bc0bcf7e845d86dffe12da (diff) | |
| parent | e42bfc92f3e072a3d51dddce06bc90587e06791c (diff) | |
Merge pull request #2733 from OancaAndrei/syncplay
Add syncplay feature
Diffstat (limited to 'Emby.Server.Implementations/Session/SessionManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Session/SessionManager.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index df98a35bc..2b09a93ef 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -25,6 +25,7 @@ using MediaBrowser.Model.Events; using MediaBrowser.Model.Library; using MediaBrowser.Model.Querying; using MediaBrowser.Model.Session; +using MediaBrowser.Model.SyncPlay; using Microsoft.Extensions.Logging; namespace Emby.Server.Implementations.Session @@ -1153,6 +1154,22 @@ namespace Emby.Server.Implementations.Session await SendMessageToSession(session, "Play", command, cancellationToken).ConfigureAwait(false); } + /// <inheritdoc /> + public async Task SendSyncPlayCommand(string sessionId, SendCommand command, CancellationToken cancellationToken) + { + CheckDisposed(); + var session = GetSessionToRemoteControl(sessionId); + await SendMessageToSession(session, "SyncPlayCommand", command, cancellationToken).ConfigureAwait(false); + } + + /// <inheritdoc /> + public async Task SendSyncPlayGroupUpdate<T>(string sessionId, GroupUpdate<T> command, CancellationToken cancellationToken) + { + CheckDisposed(); + var session = GetSessionToRemoteControl(sessionId); + await SendMessageToSession(session, "SyncPlayGroupUpdate", command, cancellationToken).ConfigureAwait(false); + } + private IEnumerable<BaseItem> TranslateItemForPlayback(Guid id, User user) { var item = _libraryManager.GetItemById(id); |
