mirror of
https://github.com/jellyfin/jellyfin-plugin-webhook.git
synced 2024-11-23 05:59:58 +00:00
Fix registering helpers during plugin initialization (#230)
This commit is contained in:
parent
96d9f3418c
commit
3a31a5f6c9
@ -1,6 +1,5 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Jellyfin.Plugin.Webhook.Helpers;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
@ -42,7 +41,6 @@ public class ItemAddedNotifierEntryPoint : IHostedService
|
||||
public Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
_libraryManager.ItemAdded += ItemAddedHandler;
|
||||
HandlebarsFunctionHelpers.RegisterHelpers();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@ using Jellyfin.Plugin.Webhook.Destinations.Pushbullet;
|
||||
using Jellyfin.Plugin.Webhook.Destinations.Pushover;
|
||||
using Jellyfin.Plugin.Webhook.Destinations.Slack;
|
||||
using Jellyfin.Plugin.Webhook.Destinations.Smtp;
|
||||
using Jellyfin.Plugin.Webhook.Helpers;
|
||||
using Jellyfin.Plugin.Webhook.Notifiers;
|
||||
using Jellyfin.Plugin.Webhook.Notifiers.ItemAddedNotifier;
|
||||
using MediaBrowser.Common.Updates;
|
||||
@ -36,6 +37,8 @@ public class PluginServiceRegistrator : IPluginServiceRegistrator
|
||||
/// <inheritdoc />
|
||||
public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost)
|
||||
{
|
||||
HandlebarsFunctionHelpers.RegisterHelpers();
|
||||
|
||||
serviceCollection.AddScoped<IWebhookClient<DiscordOption>, DiscordClient>();
|
||||
serviceCollection.AddScoped<IWebhookClient<GenericOption>, GenericClient>();
|
||||
serviceCollection.AddScoped<IWebhookClient<GenericFormOption>, GenericFormClient>();
|
||||
|
Loading…
Reference in New Issue
Block a user