Browse Source

Prefer filting by package id instead of name (#15197)

Cody Robibero 3 days ago
parent
commit
5691eee4f1
1 changed files with 4 additions and 5 deletions
  1. 4 5
      Emby.Server.Implementations/Updates/InstallationManager.cs

+ 4 - 5
Emby.Server.Implementations/Updates/InstallationManager.cs

@@ -223,15 +223,14 @@ namespace Emby.Server.Implementations.Updates
             Guid id = default,
             Version? specificVersion = null)
         {
-            if (name is not null)
-            {
-                availablePackages = availablePackages.Where(x => x.Name.Equals(name, StringComparison.OrdinalIgnoreCase));
-            }
-
             if (!id.IsEmpty())
             {
                 availablePackages = availablePackages.Where(x => x.Id.Equals(id));
             }
+            else if (name is not null)
+            {
+                availablePackages = availablePackages.Where(x => x.Name.Equals(name, StringComparison.OrdinalIgnoreCase));
+            }
 
             if (specificVersion is not null)
             {