Browse Source

Fixes Ombi auth through Jellyfin

NickSica 3 years ago
parent
commit
4b2c40f717
1 changed files with 14 additions and 3 deletions
  1. 14 3
      Jellyfin.Server.Implementations/Security/AuthorizationContext.cs

+ 14 - 3
Jellyfin.Server.Implementations/Security/AuthorizationContext.cs

@@ -185,9 +185,20 @@ namespace Jellyfin.Server.Implementations.Security
                     authInfo.IsAuthenticated = true;
                     authInfo.IsAuthenticated = true;
                     authInfo.Client = key.Name;
                     authInfo.Client = key.Name;
                     authInfo.Token = key.AccessToken;
                     authInfo.Token = key.AccessToken;
-                    authInfo.DeviceId = string.Empty;
-                    authInfo.Device = string.Empty;
-                    authInfo.Version = string.Empty;
+                    if(string.IsNullOrWhiteSpace(authInfo.DeviceId))
+                    {
+                        authInfo.DeviceId = string.Empty;
+                    }
+
+                    if(string.IsNullOrWhiteSpace(authInfo.Device))
+                    {
+                        authInfo.Device = string.Empty;
+                    }
+
+                    if(string.IsNullOrWhiteSpace(authInfo.Version))
+                    {
+                        authInfo.Version = string.Empty;
+                    }
                     authInfo.IsApiKey = true;
                     authInfo.IsApiKey = true;
                 }
                 }
             }
             }