mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 22:38:30 +01:00
update power management
This commit is contained in:
@@ -320,8 +320,9 @@ namespace MediaBrowser.ServerApplication
|
||||
logManager,
|
||||
options,
|
||||
fileSystem,
|
||||
"emby.windows.zip",
|
||||
nativeApp);
|
||||
nativeApp,
|
||||
new PowerManagement(),
|
||||
"emby.windows.zip");
|
||||
|
||||
var initProgress = new Progress<double>();
|
||||
|
||||
|
||||
@@ -127,6 +127,7 @@
|
||||
<Compile Include="Native\LnkShortcutHandler.cs" />
|
||||
<Compile Include="Native\DbConnector.cs" />
|
||||
<Compile Include="Native\LoopbackUtil.cs" />
|
||||
<Compile Include="Native\PowerManagement.cs" />
|
||||
<Compile Include="Native\Standby.cs" />
|
||||
<Compile Include="Native\ServerAuthorization.cs" />
|
||||
<Compile Include="Native\WindowsApp.cs" />
|
||||
|
||||
17
MediaBrowser.ServerApplication/Native/PowerManagement.cs
Normal file
17
MediaBrowser.ServerApplication/Native/PowerManagement.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using MediaBrowser.Model.System;
|
||||
|
||||
namespace MediaBrowser.ServerApplication.Native
|
||||
{
|
||||
public class PowerManagement : IPowerManagement
|
||||
{
|
||||
public void PreventSystemStandby()
|
||||
{
|
||||
MainStartup.Invoke(Standby.PreventSleep);
|
||||
}
|
||||
|
||||
public void AllowSystemStandby()
|
||||
{
|
||||
MainStartup.Invoke(Standby.AllowSleep);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -139,16 +139,6 @@ namespace MediaBrowser.ServerApplication.Native
|
||||
return new NetworkManager(logger);
|
||||
}
|
||||
|
||||
public void PreventSystemStandby()
|
||||
{
|
||||
MainStartup.Invoke(Standby.PreventSleep);
|
||||
}
|
||||
|
||||
public void AllowSystemStandby()
|
||||
{
|
||||
MainStartup.Invoke(Standby.AllowSleep);
|
||||
}
|
||||
|
||||
public FFMpegInstallInfo GetFfmpegInstallInfo()
|
||||
{
|
||||
var info = new FFMpegInstallInfo();
|
||||
|
||||
Reference in New Issue
Block a user