restart timers on wake
This commit is contained in:
parent
9a83394e5d
commit
51cd5e90b0
|
@ -30,6 +30,7 @@ using System.Threading.Tasks;
|
||||||
using CommonIO;
|
using CommonIO;
|
||||||
using MediaBrowser.Common.Extensions;
|
using MediaBrowser.Common.Extensions;
|
||||||
using MediaBrowser.Controller.Power;
|
using MediaBrowser.Controller.Power;
|
||||||
|
using Microsoft.Win32;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
||||||
{
|
{
|
||||||
|
@ -84,6 +85,17 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
_timerProvider.RestartTimers();
|
_timerProvider.RestartTimers();
|
||||||
|
|
||||||
|
SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Mode == PowerModes.Resume)
|
||||||
|
{
|
||||||
|
_timerProvider.RestartTimers();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public event EventHandler DataSourceChanged;
|
public event EventHandler DataSourceChanged;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user