mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-31 12:58:28 +01:00
Fix code issues
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Session;
|
||||
@@ -9,6 +8,9 @@ namespace MediaBrowser.Controller.Syncplay
|
||||
/// <summary>
|
||||
/// Class GroupInfo.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Class is not thread-safe, external locking is required when accessing methods.
|
||||
/// </remarks>
|
||||
public class GroupInfo
|
||||
{
|
||||
/// <summary>
|
||||
@@ -49,8 +51,8 @@ namespace MediaBrowser.Controller.Syncplay
|
||||
/// Gets the participants.
|
||||
/// </summary>
|
||||
/// <value>The participants, or members of the group.</value>
|
||||
public readonly ConcurrentDictionary<string, GroupMember> Participants =
|
||||
new ConcurrentDictionary<string, GroupMember>(StringComparer.OrdinalIgnoreCase);
|
||||
public readonly Dictionary<string, GroupMember> Participants =
|
||||
new Dictionary<string, GroupMember>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
/// <summary>
|
||||
/// Checks if a session is in this group.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using MediaBrowser.Controller.Session;
|
||||
using MediaBrowser.Model.Syncplay;
|
||||
|
||||
@@ -31,27 +32,31 @@ namespace MediaBrowser.Controller.Syncplay
|
||||
/// Initializes the group with the session's info.
|
||||
/// </summary>
|
||||
/// <param name="session">The session.</param>
|
||||
void InitGroup(SessionInfo session);
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
void InitGroup(SessionInfo session, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Adds the session to the group.
|
||||
/// </summary>
|
||||
/// <param name="session">The session.</param>
|
||||
/// <param name="request">The request.</param>
|
||||
void SessionJoin(SessionInfo session, JoinGroupRequest request);
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
void SessionJoin(SessionInfo session, JoinGroupRequest request, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Removes the session from the group.
|
||||
/// </summary>
|
||||
/// <param name="session">The session.</param>
|
||||
void SessionLeave(SessionInfo session);
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
void SessionLeave(SessionInfo session, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Handles the requested action by the session.
|
||||
/// </summary>
|
||||
/// <param name="session">The session.</param>
|
||||
/// <param name="request">The requested action.</param>
|
||||
void HandleRequest(SessionInfo session, PlaybackRequest request);
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
void HandleRequest(SessionInfo session, PlaybackRequest request, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the info about the group for the clients.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using MediaBrowser.Controller.Session;
|
||||
using MediaBrowser.Model.Syncplay;
|
||||
|
||||
@@ -14,7 +15,8 @@ namespace MediaBrowser.Controller.Syncplay
|
||||
/// Creates a new group.
|
||||
/// </summary>
|
||||
/// <param name="session">The session that's creating the group.</param>
|
||||
void NewGroup(SessionInfo session);
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
void NewGroup(SessionInfo session, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Adds the session to a group.
|
||||
@@ -22,27 +24,31 @@ namespace MediaBrowser.Controller.Syncplay
|
||||
/// <param name="session">The session.</param>
|
||||
/// <param name="groupId">The group id.</param>
|
||||
/// <param name="request">The request.</param>
|
||||
void JoinGroup(SessionInfo session, string groupId, JoinGroupRequest request);
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
void JoinGroup(SessionInfo session, string groupId, JoinGroupRequest request, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Removes the session from a group.
|
||||
/// </summary>
|
||||
/// <param name="session">The session.</param>
|
||||
void LeaveGroup(SessionInfo session);
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
void LeaveGroup(SessionInfo session, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets list of available groups for a session.
|
||||
/// </summary>
|
||||
/// <param name="session">The session.</param>
|
||||
/// <param name="filterItemId">The item id to filter by.</param>
|
||||
/// <value>The list of available groups.</value>
|
||||
List<GroupInfoView> ListGroups(SessionInfo session);
|
||||
List<GroupInfoView> ListGroups(SessionInfo session, Guid filterItemId);
|
||||
|
||||
/// <summary>
|
||||
/// Handle a request by a session in a group.
|
||||
/// </summary>
|
||||
/// <param name="session">The session.</param>
|
||||
/// <param name="request">The request.</param>
|
||||
void HandleRequest(SessionInfo session, PlaybackRequest request);
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
void HandleRequest(SessionInfo session, PlaybackRequest request, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Maps a session to a group.
|
||||
|
||||
Reference in New Issue
Block a user