aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Session/SessionManager.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2019-12-20 19:43:57 +0100
committerBond_009 <bond.009@outlook.com>2019-12-20 19:43:57 +0100
commit7f5a174dff98c6071fc292a41bba63d1435c2ddd (patch)
tree8831a98e9e938420b5a4198f621a3dd57847b6b1 /Emby.Server.Implementations/Session/SessionManager.cs
parent137db45fc7a91d75d81023709b77277f34958ff0 (diff)
parent06dfa2e687304874d4c8de8f7c95354b3d51225c (diff)
Merge branch 'master' into warn12
Diffstat (limited to 'Emby.Server.Implementations/Session/SessionManager.cs')
-rw-r--r--Emby.Server.Implementations/Session/SessionManager.cs21
1 files changed, 8 insertions, 13 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs
index b87ca3a11..b1d513dd4 100644
--- a/Emby.Server.Implementations/Session/SessionManager.cs
+++ b/Emby.Server.Implementations/Session/SessionManager.cs
@@ -667,12 +667,9 @@ namespace Emby.Server.Implementations.Session
data.PlayCount++;
data.LastPlayedDate = DateTime.UtcNow;
- if (item.SupportsPlayedStatus)
+ if (item.SupportsPlayedStatus && !item.SupportsPositionTicksResume)
{
- if (!(item is Video))
- {
- data.Played = true;
- }
+ data.Played = true;
}
else
{
@@ -769,7 +766,6 @@ namespace Emby.Server.Implementations.Session
{
_userDataManager.SaveUserData(user, item, data, UserDataSaveReason.PlaybackProgress, CancellationToken.None);
}
-
}
private static bool UpdatePlaybackSettings(User user, PlaybackProgressInfo info, UserItemData data)
@@ -1393,6 +1389,12 @@ namespace Emby.Server.Implementations.Session
}
}
+ if (user == null)
+ {
+ AuthenticationFailed?.Invoke(this, new GenericEventArgs<AuthenticationRequest>(request));
+ throw new SecurityException("Invalid user or password entered.");
+ }
+
if (enforcePassword)
{
user = await _userManager.AuthenticateUser(
@@ -1403,13 +1405,6 @@ namespace Emby.Server.Implementations.Session
true).ConfigureAwait(false);
}
- if (user == null)
- {
- AuthenticationFailed?.Invoke(this, new GenericEventArgs<AuthenticationRequest>(request));
-
- throw new SecurityException("Invalid user or password entered.");
- }
-
var token = GetAuthorizationToken(user, request.DeviceId, request.App, request.AppVersion, request.DeviceName);
var session = LogSessionActivity(