aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-06-25 11:12:39 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-06-25 11:12:39 -0400
commit22fc0b442ac093e55058723782adf845f4465925 (patch)
treeffb83ee65ed107a227df1b67692c8faa028dad39 /MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs
parenta55d156fd65e297b044d8ad898b1e04f659e4e60 (diff)
add short overview
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs18
1 files changed, 5 insertions, 13 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs b/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs
index 365845f41..a50a6f02e 100644
--- a/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs
+++ b/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs
@@ -113,21 +113,13 @@ namespace MediaBrowser.Server.Implementations.Session
var version = vals[2];
var deviceName = vals.Length > 3 ? vals[3] : string.Empty;
- var session = _sessionManager.Sessions
- .FirstOrDefault(i => string.Equals(i.DeviceId, deviceId) &&
- string.Equals(i.Client, client) &&
- string.Equals(i.ApplicationVersion, version));
+ var session = _sessionManager.GetSession(deviceId, client, version);
if (session == null && !string.IsNullOrEmpty(deviceName))
{
_logger.Debug("Logging session activity");
- await _sessionManager.LogSessionActivity(client, version, deviceId, deviceName, message.Connection.RemoteEndPoint, null).ConfigureAwait(false);
-
- session = _sessionManager.Sessions
- .FirstOrDefault(i => string.Equals(i.DeviceId, deviceId) &&
- string.Equals(i.Client, client) &&
- string.Equals(i.ApplicationVersion, version));
+ session = await _sessionManager.LogSessionActivity(client, version, deviceId, deviceName, message.Connection.RemoteEndPoint, null).ConfigureAwait(false);
}
if (session != null)
@@ -197,7 +189,7 @@ namespace MediaBrowser.Server.Implementations.Session
}
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
-
+
/// <summary>
/// Reports the playback start.
/// </summary>
@@ -284,7 +276,7 @@ namespace MediaBrowser.Server.Implementations.Session
_sessionManager.OnPlaybackProgress(info);
}
}
-
+
/// <summary>
/// Reports the playback progress.
/// </summary>
@@ -362,7 +354,7 @@ namespace MediaBrowser.Server.Implementations.Session
_sessionManager.OnPlaybackStopped(info);
}
}
-
+
/// <summary>
/// Reports the playback stopped.
/// </summary>