Files
Jellyfin_Xtream/Jellyfin.Xtream/PluginServiceRegistrator.cs
Kevin Jilissen 6418492e01 Use a custom metadata provider to fetch VOD data
We need an additional request for the VOD metadata, which is expensive.
Delay the fetching using a metadata provider and remove the need to
fetch with every folder change.
2025-01-31 22:21:17 +01:00

39 lines
1.5 KiB
C#

// Copyright (C) 2022 Kevin Jilissen
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
using Jellyfin.Xtream.Providers;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Channels;
using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Controller.Plugins;
using MediaBrowser.Controller.Providers;
using Microsoft.Extensions.DependencyInjection;
namespace Jellyfin.Xtream;
/// <inheritdoc />
public class PluginServiceRegistrator : IPluginServiceRegistrator
{
/// <inheritdoc />
public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost)
{
serviceCollection.AddSingleton<ILiveTvService, LiveTvService>();
serviceCollection.AddSingleton<IChannel, CatchupChannel>();
serviceCollection.AddSingleton<IChannel, SeriesChannel>();
serviceCollection.AddSingleton<IChannel, VodChannel>();
serviceCollection.AddSingleton<IPreRefreshProvider, XtreamVodProvider>();
}
}