mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-16 07:12:18 +01:00
Add SessionControllerConnected event
This commit is contained in:
@@ -128,6 +128,9 @@ namespace Emby.Server.Implementations.Session
|
||||
/// <inheritdoc />
|
||||
public event EventHandler<SessionEventArgs> SessionActivity;
|
||||
|
||||
/// <inheritdoc />
|
||||
public event EventHandler<SessionEventArgs> SessionControllerConnected;
|
||||
|
||||
/// <summary>
|
||||
/// Gets all connections.
|
||||
/// </summary>
|
||||
@@ -312,6 +315,19 @@ namespace Emby.Server.Implementations.Session
|
||||
return session;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void OnSessionControllerConnected(SessionInfo info)
|
||||
{
|
||||
EventHelper.QueueEventIfNotNull(
|
||||
SessionControllerConnected,
|
||||
this,
|
||||
new SessionEventArgs
|
||||
{
|
||||
SessionInfo = info
|
||||
},
|
||||
_logger);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void CloseIfNeeded(SessionInfo session)
|
||||
{
|
||||
|
||||
@@ -133,6 +133,8 @@ namespace Emby.Server.Implementations.Session
|
||||
|
||||
var controller = (WebSocketController)controllerInfo.Item1;
|
||||
controller.AddWebSocket(connection);
|
||||
|
||||
_sessionManager.OnSessionControllerConnected(session);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user