mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 03:48:06 +02:00
restart timers on wake
This commit is contained in:
parent
9a83394e5d
commit
51cd5e90b0
1 changed files with 12 additions and 0 deletions
|
@ -30,6 +30,7 @@ using System.Threading.Tasks;
|
|||
using CommonIO;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller.Power;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
||||
{
|
||||
|
@ -84,6 +85,17 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
|||
public void Start()
|
||||
{
|
||||
_timerProvider.RestartTimers();
|
||||
|
||||
SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;
|
||||
|
||||
}
|
||||
|
||||
void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
|
||||
{
|
||||
if (e.Mode == PowerModes.Resume)
|
||||
{
|
||||
_timerProvider.RestartTimers();
|
||||
}
|
||||
}
|
||||
|
||||
public event EventHandler DataSourceChanged;
|
||||
|
|
Loading…
Reference in a new issue