Powermenu: Standby/hibernate in singleseat - fix (1 Viewer)

styriaman

Portal Pro
September 13, 2004
74
2
Austria/Styria
Hi dev's

I fixed my problem described in https://forum.team-mediaportal.com/showpost.php?p=221366&postcount=14 by adding following bold line in ..\ClientPlugin\PowerScheduler.cs.

try
{
// persist the next wakeup datetime, this way 'resume last active module' feature is able to tell the difference between a wakeup done by
// a user or by the PS plugin
using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml")))
{
DateTime nextWakeUp = GetNextWakeupTime(DateTime.Now);
xmlwriter.SetValue("psclientplugin", "nextwakeup", nextWakeUp.ToString());
string res = xmlwriter.GetValueAsString("psclientplugin", "nextwakeup", DateTime.MaxValue.ToString());
}
RemotePowerControl.Instance.SuspendSystem("PowerSchedulerClientPlugin", (int)how, force);
}
catch (Exception e)
{
Log.Error("PSClientPlugin: SuspendSystem failed! {0} {1}", e.Message, e.StackTrace);
}


Regards

Joe
 

Users who are viewing this thread

Top Bottom