Lights Off Timer: Jellyfin sleep timer that turns off Home Assistant lights
Jellyfin 12.2 plugin that adds a sleep-timer button next to the volume control in the web player (end of this episode/movie, or N minutes). When playback stops with the timer on, it calls a Home Assistant webhook that turns the lights off after a cooldown; starting playback cancels it. The repository doubles as a Jellyfin plugin repository: manifest.json at the root points at the release zips in dist/. build.sh builds in the .NET 10 SDK container and adds new versions to the manifest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
8d456442e6
15 files changed
+934
No files matched your search
@@ -0,0 +1,17 @@
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Controller.Plugins;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace Jellyfin.Plugin.LightsOffTimer;
|
||||
|
||||
public class ServiceRegistrator : IPluginServiceRegistrator
|
||||
{
|
||||
public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost)
|
||||
{
|
||||
serviceCollection.AddSingleton<TimerManager>();
|
||||
serviceCollection.AddHostedService(sp => sp.GetRequiredService<TimerManager>());
|
||||
serviceCollection.AddTransient<IStartupFilter, ScriptInjectionStartupFilter>();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user