aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/PluginsController.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2023-01-19 10:09:32 +0100
committerShadowghost <Ghost_of_Stone@web.de>2023-01-19 10:09:32 +0100
commit656a0bff6fd48ba66cfe8fc7b470380c38afbac2 (patch)
treea89f0545050bf6672936c6e7ea3e2b0e5c5561f2 /Jellyfin.Api/Controllers/PluginsController.cs
parentef085483b2ef54195e16f282330a3c204e3227b6 (diff)
parentd57dcf22452db4990aa2cdece3eb798ba98b8330 (diff)
Merge remote-tracking branch 'upstream/master' into network-rewrite
Diffstat (limited to 'Jellyfin.Api/Controllers/PluginsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/PluginsController.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/PluginsController.cs b/Jellyfin.Api/Controllers/PluginsController.cs
index 6a729b237..b8a09990a 100644
--- a/Jellyfin.Api/Controllers/PluginsController.cs
+++ b/Jellyfin.Api/Controllers/PluginsController.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
+using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Text.Json;
@@ -143,7 +144,7 @@ namespace Jellyfin.Api.Controllers
public ActionResult UninstallPlugin([FromRoute, Required] Guid pluginId)
{
// If no version is given, return the current instance.
- var plugins = _pluginManager.Plugins.Where(p => p.Id.Equals(pluginId));
+ var plugins = _pluginManager.Plugins.Where(p => p.Id.Equals(pluginId)).ToList();
// Select the un-instanced one first.
var plugin = plugins.FirstOrDefault(p => p.Instance is null) ?? plugins.OrderBy(p => p.Manifest.Status).FirstOrDefault();