From e8761044c2303403feb18bfff4f93b9979e30068 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Sun, 17 Nov 2024 16:12:43 +0100 Subject: Fixed segment providers never presented to UI (#13060) --- Jellyfin.Api/Controllers/LibraryController.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Jellyfin.Api/Controllers/LibraryController.cs') diff --git a/Jellyfin.Api/Controllers/LibraryController.cs b/Jellyfin.Api/Controllers/LibraryController.cs index afc93c3a8..1b23683fb 100644 --- a/Jellyfin.Api/Controllers/LibraryController.cs +++ b/Jellyfin.Api/Controllers/LibraryController.cs @@ -867,6 +867,16 @@ public class LibraryController : BaseJellyfinApiController .DistinctBy(i => i.Name, StringComparer.OrdinalIgnoreCase) .ToArray(); + result.MediaSegmentProviders = plugins + .SelectMany(i => i.Plugins.Where(p => p.Type == MetadataPluginType.MediaSegmentProvider)) + .Select(i => new LibraryOptionInfoDto + { + Name = i.Name, + DefaultEnabled = true + }) + .DistinctBy(i => i.Name, StringComparer.OrdinalIgnoreCase) + .ToArray(); + var typeOptions = new List(); foreach (var type in types) -- cgit v1.2.3