diff options
| author | Ionut Andrei Oanca <oancaionutandrei@gmail.com> | 2021-03-28 13:25:40 +0200 |
|---|---|---|
| committer | Ionut Andrei Oanca <oancaionutandrei@gmail.com> | 2021-03-28 13:25:40 +0200 |
| commit | 9eb740ba57c7d8dfbffac9e18541c969eb0af880 (patch) | |
| tree | 68566f387b23972ab475569e50eaf69495cbe63e /MediaBrowser.Controller | |
| parent | 9fe3ca7a92ac12ebb0fc88c5458bc8568458a478 (diff) | |
Fix storing outdated sessions in SyncPlay
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Session/ISessionManager.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Controller/SyncPlay/GroupMember.cs | 23 |
2 files changed, 23 insertions, 8 deletions
diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs index 6c06dcad5..d22c9c6cf 100644 --- a/MediaBrowser.Controller/Session/ISessionManager.cs +++ b/MediaBrowser.Controller/Session/ISessionManager.cs @@ -156,20 +156,20 @@ namespace MediaBrowser.Controller.Session /// <summary> /// Sends a SyncPlayCommand to a session. /// </summary> - /// <param name="session">The session.</param> + /// <param name="sessionId">The identifier of the session.</param> /// <param name="command">The command.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task.</returns> - Task SendSyncPlayCommand(SessionInfo session, SendCommand command, CancellationToken cancellationToken); + Task SendSyncPlayCommand(string sessionId, SendCommand command, CancellationToken cancellationToken); /// <summary> /// Sends a SyncPlayGroupUpdate to a session. /// </summary> - /// <param name="session">The session.</param> + /// <param name="sessionId">The identifier of the session.</param> /// <param name="command">The group update.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task.</returns> - Task SendSyncPlayGroupUpdate<T>(SessionInfo session, GroupUpdate<T> command, CancellationToken cancellationToken); + Task SendSyncPlayGroupUpdate<T>(string sessionId, GroupUpdate<T> command, CancellationToken cancellationToken); /// <summary> /// Sends the browse command. diff --git a/MediaBrowser.Controller/SyncPlay/GroupMember.cs b/MediaBrowser.Controller/SyncPlay/GroupMember.cs index 5fb982e85..361c91d53 100644 --- a/MediaBrowser.Controller/SyncPlay/GroupMember.cs +++ b/MediaBrowser.Controller/SyncPlay/GroupMember.cs @@ -1,3 +1,4 @@ +using System; using MediaBrowser.Controller.Session; namespace MediaBrowser.Controller.SyncPlay @@ -13,14 +14,28 @@ namespace MediaBrowser.Controller.SyncPlay /// <param name="session">The session.</param> public GroupMember(SessionInfo session) { - Session = session; + SessionId = session.Id; + UserId = session.UserId; + UserName = session.UserName; } /// <summary> - /// Gets the session. + /// Gets the identifier of the session. /// </summary> - /// <value>The session.</value> - public SessionInfo Session { get; } + /// <value>The session identifier.</value> + public string SessionId { get; } + + /// <summary> + /// Gets the identifier of the user. + /// </summary> + /// <value>The user identifier.</value> + public Guid UserId { get; } + + /// <summary> + /// Gets the username. + /// </summary> + /// <value>The username.</value> + public string UserName { get; } /// <summary> /// Gets or sets the ping, in milliseconds. |
