Synchronize native Enigma2 channels every six hours and migrate preferences

This commit is contained in:
2026-10-23 19:26:28 +02:00
parent 50b39fa40b
commit 2e7662f018
11 changed files with 391 additions and 6 deletions
@@ -24,6 +24,8 @@ namespace Jellyfin.Plugin.Enigma2
serviceCollection.AddSingleton<PreferencesStore>();
serviceCollection.AddTransient<Microsoft.AspNetCore.Hosting.IStartupFilter, NativeChannelFilter>();
serviceCollection.AddSingleton<ILiveTvService, LiveTvService>();
serviceCollection.AddSingleton<ChannelSyncTask>();
serviceCollection.AddSingleton<MediaBrowser.Model.Tasks.IScheduledTask>(provider => provider.GetRequiredService<ChannelSyncTask>());
// Jellyfin registers services before constructing Plugin.Instance.
var paths = serviceCollection.Last(x => x.ServiceType == typeof(IApplicationPaths)).ImplementationInstance as IApplicationPaths;
if (VuRecordingsEnabled(Path.Combine(paths.PluginConfigurationsPath, "Jellyfin.Plugin.Enigma2.xml")))