aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Session/SessionManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Session/SessionManager.cs')
-rw-r--r--Emby.Server.Implementations/Session/SessionManager.cs30
1 files changed, 15 insertions, 15 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs
index b1d513dd4..ec3e87573 100644
--- a/Emby.Server.Implementations/Session/SessionManager.cs
+++ b/Emby.Server.Implementations/Session/SessionManager.cs
@@ -67,15 +67,15 @@ namespace Emby.Server.Implementations.Session
public event EventHandler<GenericEventArgs<AuthenticationResult>> AuthenticationSucceeded;
/// <summary>
- /// Occurs when [playback start].
+ /// Occurs when playback has started.
/// </summary>
public event EventHandler<PlaybackProgressEventArgs> PlaybackStart;
/// <summary>
- /// Occurs when [playback progress].
+ /// Occurs when playback has progressed.
/// </summary>
public event EventHandler<PlaybackProgressEventArgs> PlaybackProgress;
/// <summary>
- /// Occurs when [playback stopped].
+ /// Occurs when playback has stopped.
/// </summary>
public event EventHandler<PlaybackStopEventArgs> PlaybackStopped;
@@ -685,7 +685,7 @@ namespace Emby.Server.Implementations.Session
}
/// <summary>
- /// Used to report playback progress for an item
+ /// Used to report playback progress for an item.
/// </summary>
/// <returns>Task.</returns>
public async Task OnPlaybackProgress(PlaybackProgressInfo info, bool isAutomated)
@@ -1435,14 +1435,13 @@ namespace Emby.Server.Implementations.Session
DeviceId = deviceId,
UserId = user.Id,
Limit = 1
-
}).Items.FirstOrDefault();
- var allExistingForDevice = _authRepo.Get(new AuthenticationInfoQuery
- {
- DeviceId = deviceId
-
- }).Items;
+ var allExistingForDevice = _authRepo.Get(
+ new AuthenticationInfoQuery
+ {
+ DeviceId = deviceId
+ }).Items;
foreach (var auth in allExistingForDevice)
{
@@ -1499,8 +1498,7 @@ namespace Emby.Server.Implementations.Session
{
Limit = 1,
AccessToken = accessToken
-
- }).Items.FirstOrDefault();
+ }).Items[0];
if (existing != null)
{
@@ -1708,7 +1706,8 @@ namespace Emby.Server.Implementations.Session
public void ReportTranscodingInfo(string deviceId, TranscodingInfo info)
{
- var session = Sessions.FirstOrDefault(i => string.Equals(i.DeviceId, deviceId));
+ var session = Sessions.FirstOrDefault(i =>
+ string.Equals(i.DeviceId, deviceId, StringComparison.OrdinalIgnoreCase));
if (session != null)
{
@@ -1723,8 +1722,9 @@ namespace Emby.Server.Implementations.Session
public SessionInfo GetSession(string deviceId, string client, string version)
{
- return Sessions.FirstOrDefault(i => string.Equals(i.DeviceId, deviceId) &&
- string.Equals(i.Client, client));
+ return Sessions.FirstOrDefault(i =>
+ string.Equals(i.DeviceId, deviceId, StringComparison.OrdinalIgnoreCase)
+ && string.Equals(i.Client, client, StringComparison.OrdinalIgnoreCase));
}
public SessionInfo GetSessionByAuthenticationToken(AuthenticationInfo info, string deviceId, string remoteEndpoint, string appVersion)