mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-27 10:58:44 +01:00
updated nuget
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Model.Net;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace MediaBrowser.Controller.Session
|
||||
{
|
||||
@@ -14,7 +11,6 @@ namespace MediaBrowser.Controller.Session
|
||||
{
|
||||
public SessionInfo()
|
||||
{
|
||||
WebSockets = new List<IWebSocketConnection>();
|
||||
QueueableMediaTypes = new List<string>();
|
||||
}
|
||||
|
||||
@@ -114,18 +110,18 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <value>The device id.</value>
|
||||
public string DeviceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the web socket.
|
||||
/// </summary>
|
||||
/// <value>The web socket.</value>
|
||||
public List<IWebSocketConnection> WebSockets { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the application version.
|
||||
/// </summary>
|
||||
/// <value>The application version.</value>
|
||||
public string ApplicationVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the session controller.
|
||||
/// </summary>
|
||||
/// <value>The session controller.</value>
|
||||
public ISessionController SessionController { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is active.
|
||||
/// </summary>
|
||||
@@ -134,9 +130,9 @@ namespace MediaBrowser.Controller.Session
|
||||
{
|
||||
get
|
||||
{
|
||||
if (WebSockets.Count > 0)
|
||||
if (SessionController != null)
|
||||
{
|
||||
return WebSockets.Any(i => i.State == WebSocketState.Open);
|
||||
return SessionController.IsSessionActive;
|
||||
}
|
||||
|
||||
return (DateTime.UtcNow - LastActivityDate).TotalMinutes <= 10;
|
||||
@@ -151,7 +147,12 @@ namespace MediaBrowser.Controller.Session
|
||||
{
|
||||
get
|
||||
{
|
||||
return WebSockets.Any(i => i.State == WebSocketState.Open);
|
||||
if (SessionController != null)
|
||||
{
|
||||
return SessionController.SupportsMediaRemoteControl;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user