diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-05-22 22:01:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-22 22:01:03 +0100 |
| commit | 51fb6e1d2d4ed30ead48400e71706a609547937e (patch) | |
| tree | 18e42025cf00afb98444f36215d6a9a9ed8b15aa /Jellyfin.Api/Controllers/PluginsController.cs | |
| parent | d0537a3271ca9294dce1e86af290e2109ba5e15f (diff) | |
| parent | db9d3b8653d865459e5df5a2fba18f0c9462dbb6 (diff) | |
Merge branch 'master' into IsRoot_fix
Diffstat (limited to 'Jellyfin.Api/Controllers/PluginsController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/PluginsController.cs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Jellyfin.Api/Controllers/PluginsController.cs b/Jellyfin.Api/Controllers/PluginsController.cs index adec86a10..7a6130719 100644 --- a/Jellyfin.Api/Controllers/PluginsController.cs +++ b/Jellyfin.Api/Controllers/PluginsController.cs @@ -207,12 +207,7 @@ namespace Jellyfin.Api.Controllers var plugins = _pluginManager.Plugins.Where(p => p.Id.Equals(pluginId)); // Select the un-instanced one first. - var plugin = plugins.FirstOrDefault(p => p.Instance == null); - if (plugin == null) - { - // Then by the status. - plugin = plugins.OrderBy(p => p.Manifest.Status).FirstOrDefault(); - } + var plugin = plugins.FirstOrDefault(p => p.Instance == null) ?? plugins.OrderBy(p => p.Manifest.Status).FirstOrDefault(); if (plugin != null) { |
