diff options
| author | Patrick Barron <barronpm@gmail.com> | 2020-05-15 17:20:07 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2020-05-15 17:20:07 -0400 |
| commit | aca7e221d811040bdb14da6390bbd16c5f7db785 (patch) | |
| tree | 87c77521066511890e236a97afb27a475f32c0a3 /Emby.Server.Implementations/Session/SessionManager.cs | |
| parent | b7621d762c58320b35096838ae8ab10d98ea9bb2 (diff) | |
| parent | 652e9702fc67784fd11e26ee159f31e6f0ba9dd7 (diff) | |
Merge branch 'master' into userdb-efcore
# Conflicts:
# Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs
# Emby.Server.Implementations/ApplicationHost.cs
# Emby.Server.Implementations/Devices/DeviceManager.cs
# Jellyfin.Server/Jellyfin.Server.csproj
# Jellyfin.Server/Migrations/MigrationRunner.cs
# MediaBrowser.Controller/Devices/IDeviceManager.cs
Diffstat (limited to 'Emby.Server.Implementations/Session/SessionManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Session/SessionManager.cs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index d595e96bd..84b16f1c7 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -490,8 +490,7 @@ namespace Emby.Server.Implementations.Session Client = appName, DeviceId = deviceId, ApplicationVersion = appVersion, - Id = key.GetMD5().ToString("N", CultureInfo.InvariantCulture), - ServerId = _appHost.SystemId + Id = key.GetMD5().ToString("N", CultureInfo.InvariantCulture) }; var username = user?.Username; @@ -1052,12 +1051,12 @@ namespace Emby.Server.Implementations.Session private static async Task SendMessageToSession<T>(SessionInfo session, string name, T data, CancellationToken cancellationToken) { - var controllers = session.SessionControllers.ToArray(); - var messageId = Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture); + var controllers = session.SessionControllers; + var messageId = Guid.NewGuid(); foreach (var controller in controllers) { - await controller.SendMessage(name, messageId, data, controllers, cancellationToken).ConfigureAwait(false); + await controller.SendMessage(name, messageId, data, cancellationToken).ConfigureAwait(false); } } @@ -1065,13 +1064,13 @@ namespace Emby.Server.Implementations.Session { IEnumerable<Task> GetTasks() { - var messageId = Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture); + var messageId = Guid.NewGuid(); foreach (var session in sessions) { var controllers = session.SessionControllers; foreach (var controller in controllers) { - yield return controller.SendMessage(name, messageId, data, controllers, cancellationToken); + yield return controller.SendMessage(name, messageId, data, cancellationToken); } } } @@ -1772,7 +1771,7 @@ namespace Emby.Server.Implementations.Session throw new ArgumentNullException(nameof(info)); } - var user = info.UserId.Equals(Guid.Empty) + var user = info.UserId == Guid.Empty ? null : _userManager.GetUserById(info.UserId); |
