aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Session/SessionInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Session/SessionInfo.cs')
-rw-r--r--MediaBrowser.Controller/Session/SessionInfo.cs29
1 files changed, 15 insertions, 14 deletions
diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs
index d50f19c1f..ed2fcda67 100644
--- a/MediaBrowser.Controller/Session/SessionInfo.cs
+++ b/MediaBrowser.Controller/Session/SessionInfo.cs
@@ -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>();
}
@@ -115,18 +111,18 @@ namespace MediaBrowser.Controller.Session
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>
/// <value><c>true</c> if this instance is active; otherwise, <c>false</c>.</value>
@@ -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;
}
}
}