First POC with working playback
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using Jellyfin.Plugin.JellyLMS.Services;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Controller.Plugins;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Jellyfin.Plugin.JellyLMS;
|
||||
|
||||
/// <summary>
|
||||
/// Registers plugin services with Jellyfin's DI container.
|
||||
/// </summary>
|
||||
public class PluginServiceRegistrator : IPluginServiceRegistrator
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost)
|
||||
{
|
||||
serviceCollection.AddSingleton<ILmsApiClient, LmsApiClient>();
|
||||
serviceCollection.AddSingleton<LmsPlayerManager>();
|
||||
serviceCollection.AddSingleton<LmsSessionManager>();
|
||||
serviceCollection.AddHostedService(sp => sp.GetRequiredService<LmsSessionManager>());
|
||||
|
||||
// Device discovery service - registers LMS players as Jellyfin sessions for casting
|
||||
// Use AddHostedService directly to let DI handle construction
|
||||
serviceCollection.AddHostedService<LmsDeviceDiscoveryService>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user