mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-12-27 09:56:33 +00:00
Fixed segment providers never presented to UI (#13060)
This commit is contained in:
parent
cf79b072a7
commit
e8761044c2
|
@ -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<LibraryTypeOptionsDto>();
|
||||
|
||||
foreach (var type in types)
|
||||
|
|
|
@ -28,6 +28,11 @@ public class LibraryOptionsResultDto
|
|||
/// </summary>
|
||||
public IReadOnlyList<LibraryOptionInfoDto> LyricFetchers { get; set; } = Array.Empty<LibraryOptionInfoDto>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the list of MediaSegment Providers.
|
||||
/// </summary>
|
||||
public IReadOnlyList<LibraryOptionInfoDto> MediaSegmentProviders { get; set; } = Array.Empty<LibraryOptionInfoDto>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type options.
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in a new issue