using Jellyfin.Plugin.JRay.Services;
using Jellyfin.Plugin.JRay.Services.Interfaces;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Plugins;
using Microsoft.Extensions.DependencyInjection;
namespace Jellyfin.Plugin.JRay;
///
/// Service registrator for dependency injection.
///
public class ServiceRegistrator : IPluginServiceRegistrator
{
///
public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost)
{
serviceCollection.AddSingleton();
serviceCollection.AddSingleton();
serviceCollection.AddSingleton();
// Singleton so per-server backoff state survives across requests: a
// server that is down should be skipped for the whole sweep, not
// retried once per item (JR-037).
serviceCollection.AddSingleton();
// Registered concretely: there is no second implementation for an
// interface to abstract over and nothing to gain from inventing one
// (JR-042). The aligner consumes the signature on the fetch path, so a
// manifest is checked against the local file before its windows are
// stored (JR-047).
serviceCollection.AddSingleton();
serviceCollection.AddSingleton();
}
}