aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Users
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2023-10-14 10:55:12 -0600
committerCody Robibero <cody@robibe.ro>2023-10-14 10:55:12 -0600
commit13f46e3fff0cd387a7ed1fe34168e9fd83ea65ef (patch)
tree2905c0041cbd46c052ca56b55c243292a888cafc /Jellyfin.Server.Implementations/Users
parent6bd6fb6e0a4828cc5cb16a4e48a8fba20a7d6305 (diff)
Shorten lines from review
Diffstat (limited to 'Jellyfin.Server.Implementations/Users')
-rw-r--r--Jellyfin.Server.Implementations/Users/UserManager.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs
index 31eda08a0..7e56e4c9e 100644
--- a/Jellyfin.Server.Implementations/Users/UserManager.cs
+++ b/Jellyfin.Server.Implementations/Users/UserManager.cs
@@ -293,6 +293,7 @@ namespace Jellyfin.Server.Implementations.Users
public 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.Users
MyMediaExcludes = 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
{