diff options
| author | Bond-009 <bond.009@outlook.com> | 2024-01-17 15:42:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-17 15:42:37 +0100 |
| commit | 484ccf7f284dcd074e06ed90af6cde4864adecea (patch) | |
| tree | 2c8c7765ed1ff8ada59669fff07e0f4f648bbde6 /src/Jellyfin.LiveTv/Extensions | |
| parent | 0f26d870ded3fdc0cd8dc389576173098e0b010d (diff) | |
| parent | c101d287f24cf53bce0674bf70d88ae61da67ed9 (diff) | |
Merge pull request #10858 from barronpm/livetv-tunerhostmanager
Add ITunerHostManager service and minor LiveTv cleanup
Diffstat (limited to 'src/Jellyfin.LiveTv/Extensions')
| -rw-r--r-- | src/Jellyfin.LiveTv/Extensions/LiveTvServiceCollectionExtensions.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/Jellyfin.LiveTv/Extensions/LiveTvServiceCollectionExtensions.cs b/src/Jellyfin.LiveTv/Extensions/LiveTvServiceCollectionExtensions.cs new file mode 100644 index 000000000..5490547ec --- /dev/null +++ b/src/Jellyfin.LiveTv/Extensions/LiveTvServiceCollectionExtensions.cs @@ -0,0 +1,31 @@ +using Jellyfin.LiveTv.Channels; +using Jellyfin.LiveTv.TunerHosts; +using Jellyfin.LiveTv.TunerHosts.HdHomerun; +using MediaBrowser.Controller.Channels; +using MediaBrowser.Controller.LiveTv; +using MediaBrowser.Model.IO; +using Microsoft.Extensions.DependencyInjection; + +namespace Jellyfin.LiveTv.Extensions; + +/// <summary> +/// Live TV extensions for <see cref="IServiceCollection"/>. +/// </summary> +public static class LiveTvServiceCollectionExtensions +{ + /// <summary> + /// Adds Live TV services to the <see cref="IServiceCollection"/>. + /// </summary> + /// <param name="services">The <see cref="IServiceCollection"/> to add services to.</param> + public static void AddLiveTvServices(this IServiceCollection services) + { + services.AddSingleton<LiveTvDtoService>(); + services.AddSingleton<ILiveTvManager, LiveTvManager>(); + services.AddSingleton<IChannelManager, ChannelManager>(); + services.AddSingleton<IStreamHelper, StreamHelper>(); + services.AddSingleton<ITunerHostManager, TunerHostManager>(); + + services.AddSingleton<ITunerHost, HdHomerunHost>(); + services.AddSingleton<ITunerHost, M3UTunerHost>(); + } +} |
