diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-05-05 23:22:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-05 23:22:54 +0100 |
| commit | e682c230bd978a47ffd42d0cb8013ef8705b66ba (patch) | |
| tree | 828852da0cb735df015cd937e03e0a3b37f3bce2 /Jellyfin.Api/Controllers/PluginsController.cs | |
| parent | 107412f2f2ae5b4b282ff533636661071b2d215d (diff) | |
| parent | 95b1cf532b577aa744d5301af4eeb78d08da3ba8 (diff) | |
Merge branch 'master' into comparisons
Diffstat (limited to 'Jellyfin.Api/Controllers/PluginsController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/PluginsController.cs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Jellyfin.Api/Controllers/PluginsController.cs b/Jellyfin.Api/Controllers/PluginsController.cs index 24285bfb9..7a6130719 100644 --- a/Jellyfin.Api/Controllers/PluginsController.cs +++ b/Jellyfin.Api/Controllers/PluginsController.cs @@ -12,7 +12,6 @@ using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Json; using MediaBrowser.Common.Plugins; using MediaBrowser.Common.Updates; -using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Net; using MediaBrowser.Model.Plugins; using Microsoft.AspNetCore.Authorization; @@ -208,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) { |
