All checks were successful
Publish Release / release (push) Successful in 1m34s
Registers TrailerIntroProvider as IIntroProvider. Queries fake-movie items in the output folder and returns their local trailer extras (LocalTrailers) as IntroInfo — mirroring jellyfin-plugin-cinemamode's proven pattern so Wholphin plays the actual trailer, not the 3-second black placeholder. Recursion guard: items whose path starts with the output folder are excluded from intro injection, so Wholphin's getIntros call on the intro item itself returns empty. Server-scoped query bypasses library visibility restrictions so hidden trailer libraries still work. Adds TrailersPerMovie config option (default 1, 0 = disabled). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
23 lines
943 B
C#
23 lines
943 B
C#
using Jellyfin.Plugin.CinemaTrailers4Jellyfins.ScheduledTasks;
|
|
using Jellyfin.Plugin.CinemaTrailers4Jellyfins.Services;
|
|
using MediaBrowser.Controller;
|
|
using MediaBrowser.Controller.Library;
|
|
using MediaBrowser.Controller.Plugins;
|
|
using MediaBrowser.Model.Tasks;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace Jellyfin.Plugin.CinemaTrailers4Jellyfins
|
|
{
|
|
public class PluginServiceRegistrator : IPluginServiceRegistrator
|
|
{
|
|
public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost)
|
|
{
|
|
serviceCollection.AddSingleton<TmdbService>();
|
|
serviceCollection.AddSingleton<TrailerDownloadService>();
|
|
serviceCollection.AddSingleton<FakeMovieService>();
|
|
serviceCollection.AddTransient<IScheduledTask, DownloadTrailersTask>();
|
|
serviceCollection.AddTransient<IIntroProvider, TrailerIntroProvider>();
|
|
}
|
|
}
|
|
}
|