mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 13:57:14 -04:00
Make the count an int for cleanliness
This commit is contained in:
parent
d0ec6872f3
commit
8dfa2015d0
@ -1484,7 +1484,7 @@ namespace Emby.Server.Implementations.Session
|
|||||||
throw new SecurityException("User is not allowed access from this device.");
|
throw new SecurityException("User is not allowed access from this device.");
|
||||||
}
|
}
|
||||||
|
|
||||||
var sessionsCount = Sessions.Where(i => string.Equals(i.UserId, user.Id)).ToList().Count;
|
int sessionsCount = Sessions.Where(i => string.Equals(i.UserId, user.Id)).ToList().Count;
|
||||||
int maxActiveSessions = user.MaxActiveSessions;
|
int maxActiveSessions = user.MaxActiveSessions;
|
||||||
_logger.LogInformation("Current/Max sessions for user {User}: {Sessions}/{Max}", user.Username, sessionsCount, maxActiveSessions);
|
_logger.LogInformation("Current/Max sessions for user {User}: {Sessions}/{Max}", user.Username, sessionsCount, maxActiveSessions);
|
||||||
if (maxActiveSessions >= 1 && sessionsCount >= maxActiveSessions)
|
if (maxActiveSessions >= 1 && sessionsCount >= maxActiveSessions)
|
||||||
|
Loading…
Reference in New Issue
Block a user