aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Jellyfin.LiveTv/Extensions/LiveTvServiceCollectionExtensions.cs25
1 files changed, 25 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..5865e88af
--- /dev/null
+++ b/src/Jellyfin.LiveTv/Extensions/LiveTvServiceCollectionExtensions.cs
@@ -0,0 +1,25 @@
+using Jellyfin.LiveTv.Channels;
+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>();
+ }
+}