using Jellyfin.Plugin.Jellypod.Channels; using Jellyfin.Plugin.Jellypod.Services; using MediaBrowser.Controller; using MediaBrowser.Controller.Channels; using MediaBrowser.Controller.Plugins; using Microsoft.Extensions.DependencyInjection; namespace Jellyfin.Plugin.Jellypod; /// /// Registers plugin services with the dependency injection container. /// public class PluginServiceRegistrator : IPluginServiceRegistrator { /// public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost) { // Register HTTP client serviceCollection.AddHttpClient("Jellypod", client => { client.DefaultRequestHeaders.Add("User-Agent", "Jellypod/1.0 (Jellyfin Podcast Plugin)"); client.Timeout = System.TimeSpan.FromMinutes(10); }); // Register services serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); // Register channel serviceCollection.AddSingleton(); } }