Fixed segment providers never presented to UI (#13060)

This commit is contained in:
JPVenson 2024-11-17 16:12:43 +01:00 committed by GitHub
parent cf79b072a7
commit e8761044c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View file

@ -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)

View file

@ -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>