Files
blackBarRemover/JellyfinPlugin/PluginServiceRegistrator.cs
T
karol 795f42048f feat(server): elegantly force transcoding for black bar removal
- Intercept HLS playlist queries to append `allowVideoStreamCopy=false`
- Append `transcodeReasons=VideoResolutionNotSupported` for accurate dashboard reporting
- Modify ffmpeg-wrapper.sh to cleanly inject `-vf crop=...` during active transcodes
- Strip `file:` prefix from inputs in the wrapper to ensure correct API lookups
- Remove hacky URL manipulations (e.g., dummy codecs) that caused FFmpeg crashes
2026-09-17 17:41:59 +02:00

25 lines
1.3 KiB
C#

using MediaBrowser.Controller.Plugins;
using Microsoft.Extensions.DependencyInjection;
using JellyfinPlugin.Tasks;
namespace JellyfinPlugin
{
public class PluginServiceRegistrator : IPluginServiceRegistrator
{
public void RegisterServices(IServiceCollection serviceCollection, MediaBrowser.Controller.IServerApplicationHost applicationHost)
{
// Zarejestrowanie filtru wstrzykującego nasz skrypt kliencki
serviceCollection.AddSingleton<Microsoft.AspNetCore.Hosting.IStartupFilter, ScriptInjectionStartupFilter>();
// Zarejestrowanie filtru wymuszającego transkodowanie dla Server Mode
serviceCollection.AddSingleton<Microsoft.AspNetCore.Hosting.IStartupFilter, PlaybackInfoInterceptorStartupFilter>();
serviceCollection.AddHostedService<WrapperGenerator>();
serviceCollection.AddHostedService<LibraryMonitor>();
// W Jellyfin 10.9+ zadania harmonogramu czasami trzeba jawnie rejestrować jeśli refleksja ich nie wychwyci
serviceCollection.AddScoped<MediaBrowser.Model.Tasks.IScheduledTask, LibraryRetroactiveScanTask>();
serviceCollection.AddScoped<MediaBrowser.Model.Tasks.IScheduledTask, LibraryForceRescanTask>();
}
}
}