restart timers on wake

This commit is contained in:
Luke Pulverenti 2016-01-27 01:07:01 -05:00
parent 9a83394e5d
commit 51cd5e90b0

View File

@ -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;