The Free Software Media System - Server Backend & API
Shorten lines from review
Cody Robibero13f46e3fff0c
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.csindex 31eda08a01..7e56e4c9e4 100644--- a/Jellyfin.Server.Implementations/Users/UserManager.cs+++ b/Jellyfin.Server.Implementations/Users/UserManager.cs@@ -293,6 +293,7 @@ namespace Jellyfin.Server.Implementations.Userspublic UserDto GetUserDto(User user, string? remoteEndPoint = null){var hasPassword = GetAuthenticationProvider(user).HasPassword(user);+ var castReceiverApplications = _serverConfigurationManager.Configuration.CastReceiverApplications;return new UserDto{Name = user.Username,@@ -322,9 +323,9 @@ namespace Jellyfin.Server.Implementations.UsersMyMediaExcludes = user.GetPreferenceValues<Guid>(PreferenceKind.MyMediaExcludes),LatestItemsExcludes = user.GetPreferenceValues<Guid>(PreferenceKind.LatestItemExcludes),CastReceiverId = string.IsNullOrEmpty(user.CastReceiverId)- ? _serverConfigurationManager.Configuration.CastReceiverApplications.FirstOrDefault()?.Id- : _serverConfigurationManager.Configuration.CastReceiverApplications.FirstOrDefault(c => string.Equals(c.Id, user.CastReceiverId, StringComparison.Ordinal))?.Id- ?? _serverConfigurationManager.Configuration.CastReceiverApplications.FirstOrDefault()?.Id+ ? castReceiverApplications.FirstOrDefault()?.Id+ : castReceiverApplications.FirstOrDefault(c => string.Equals(c.Id, user.CastReceiverId, StringComparison.Ordinal))?.Id+ ?? castReceiverApplications.FirstOrDefault()?.Id},Policy = new UserPolicy{