From eb72c2db513f5306eecccb94f0f1cd5296a7d7db Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 2 Oct 2013 21:22:50 -0400 Subject: updated nuget --- MediaBrowser.Controller/Session/SessionInfo.cs | 29 +++++++++++++------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'MediaBrowser.Controller/Session/SessionInfo.cs') diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs index d50f19c1f0..ed2fcda678 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(); QueueableMediaTypes = new List(); } @@ -114,18 +110,18 @@ namespace MediaBrowser.Controller.Session /// The device id. public string DeviceId { get; set; } - /// - /// Gets or sets the web socket. - /// - /// The web socket. - public List WebSockets { get; set; } - /// /// Gets or sets the application version. /// /// The application version. public string ApplicationVersion { get; set; } + /// + /// Gets or sets the session controller. + /// + /// The session controller. + public ISessionController SessionController { get; set; } + /// /// Gets a value indicating whether this instance is active. /// @@ -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; } } } -- cgit v1.2.3