mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-10-20 15:54:38 +00:00
Add api key functions
This commit is contained in:
parent
59de5c0d14
commit
b5641013ce
16 changed files with 168 additions and 39 deletions
|
|
@ -62,14 +62,28 @@ namespace MediaBrowser.Server.Implementations.Session
|
|||
|
||||
void connection_Closed(object sender, EventArgs e)
|
||||
{
|
||||
var capabilities = new SessionCapabilities
|
||||
if (!GetActiveSockets().Any())
|
||||
{
|
||||
PlayableMediaTypes = Session.PlayableMediaTypes,
|
||||
SupportedCommands = Session.SupportedCommands,
|
||||
SupportsMediaControl = SupportsMediaControl
|
||||
};
|
||||
try
|
||||
{
|
||||
_sessionManager.ReportSessionEnded(Session.Id);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorException("Error reporting session ended.", ex);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var capabilities = new SessionCapabilities
|
||||
{
|
||||
PlayableMediaTypes = Session.PlayableMediaTypes,
|
||||
SupportedCommands = Session.SupportedCommands,
|
||||
SupportsMediaControl = SupportsMediaControl
|
||||
};
|
||||
|
||||
_sessionManager.ReportCapabilities(Session.Id, capabilities);
|
||||
_sessionManager.ReportCapabilities(Session.Id, capabilities);
|
||||
}
|
||||
}
|
||||
|
||||
private IWebSocketConnection GetActiveSocket()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue