|
@@ -67,15 +67,15 @@ namespace Emby.Server.Implementations.Session
|
|
public event EventHandler<GenericEventArgs<AuthenticationResult>> AuthenticationSucceeded;
|
|
public event EventHandler<GenericEventArgs<AuthenticationResult>> AuthenticationSucceeded;
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
- /// Occurs when [playback start].
|
|
|
|
|
|
+ /// Occurs when playback has started.
|
|
/// </summary>
|
|
/// </summary>
|
|
public event EventHandler<PlaybackProgressEventArgs> PlaybackStart;
|
|
public event EventHandler<PlaybackProgressEventArgs> PlaybackStart;
|
|
/// <summary>
|
|
/// <summary>
|
|
- /// Occurs when [playback progress].
|
|
|
|
|
|
+ /// Occurs when playback has progressed.
|
|
/// </summary>
|
|
/// </summary>
|
|
public event EventHandler<PlaybackProgressEventArgs> PlaybackProgress;
|
|
public event EventHandler<PlaybackProgressEventArgs> PlaybackProgress;
|
|
/// <summary>
|
|
/// <summary>
|
|
- /// Occurs when [playback stopped].
|
|
|
|
|
|
+ /// Occurs when playback has stopped.
|
|
/// </summary>
|
|
/// </summary>
|
|
public event EventHandler<PlaybackStopEventArgs> PlaybackStopped;
|
|
public event EventHandler<PlaybackStopEventArgs> PlaybackStopped;
|
|
|
|
|
|
@@ -685,7 +685,7 @@ namespace Emby.Server.Implementations.Session
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
- /// Used to report playback progress for an item
|
|
|
|
|
|
+ /// Used to report playback progress for an item.
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <returns>Task.</returns>
|
|
/// <returns>Task.</returns>
|
|
public async Task OnPlaybackProgress(PlaybackProgressInfo info, bool isAutomated)
|
|
public async Task OnPlaybackProgress(PlaybackProgressInfo info, bool isAutomated)
|
|
@@ -1435,14 +1435,13 @@ namespace Emby.Server.Implementations.Session
|
|
DeviceId = deviceId,
|
|
DeviceId = deviceId,
|
|
UserId = user.Id,
|
|
UserId = user.Id,
|
|
Limit = 1
|
|
Limit = 1
|
|
-
|
|
|
|
}).Items.FirstOrDefault();
|
|
}).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)
|
|
foreach (var auth in allExistingForDevice)
|
|
{
|
|
{
|
|
@@ -1499,8 +1498,7 @@ namespace Emby.Server.Implementations.Session
|
|
{
|
|
{
|
|
Limit = 1,
|
|
Limit = 1,
|
|
AccessToken = accessToken
|
|
AccessToken = accessToken
|
|
-
|
|
|
|
- }).Items.FirstOrDefault();
|
|
|
|
|
|
+ }).Items[0];
|
|
|
|
|
|
if (existing != null)
|
|
if (existing != null)
|
|
{
|
|
{
|
|
@@ -1708,7 +1706,8 @@ namespace Emby.Server.Implementations.Session
|
|
|
|
|
|
public void ReportTranscodingInfo(string deviceId, TranscodingInfo info)
|
|
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)
|
|
if (session != null)
|
|
{
|
|
{
|
|
@@ -1723,8 +1722,9 @@ namespace Emby.Server.Implementations.Session
|
|
|
|
|
|
public SessionInfo GetSession(string deviceId, string client, string version)
|
|
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)
|
|
public SessionInfo GetSessionByAuthenticationToken(AuthenticationInfo info, string deviceId, string remoteEndpoint, string appVersion)
|