795f42048f
- 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
25 lines
1.3 KiB
C#
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>();
|
|
}
|
|
}
|
|
}
|