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: the signature is computed, not yet consumed, so // there is no second implementation for an interface to abstract over // and nothing to gain from inventing one (JR-042). serviceCollection.AddSingleton(); } }