MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal TV-Server 1 » Help on Development » Development


Development You want to code something for the TV-Server? Share it in here!

Reply
 
Thread Tools Display Modes
Old 2008-01-07, 22:29   #1 (permalink)
Portal Member
 
Join Date: Sep 2004
Location: Austria/Styria
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts


Lightbulb Powermenu: Standby/hibernate in singleseat - fix

Hi dev's

I fixed my problem described in http://forum.team-mediaportal.com/sh...6&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("PowerSc hedulerClientPlugin", (int)how, force);
}
catch (Exception e)
{
Log.Error("PSClientPlugin: SuspendSystem failed! {0} {1}", e.Message, e.StackTrace);
}


Regards

Joe
styriaman is offline   Reply With Quote
Reply

Bookmarks

Tags
fix, powermenu, singleseat, standby or hibernate

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
TVServer Hibernate/Standby AxelSt Get Support 2 2007-02-02 11:36
[patch] A possible fix for some resume from standby/hibernation problems ziphnor General Development (no feature request here!) 17 2006-09-27 07:30
Powerscheduler goes to standby instead of hibernate ammm General Support 3 2006-09-27 07:29
shortcut for hibernate or standby? wunschkind General Support 4 2006-05-18 16:55


All times are GMT +1. The time now is 02:12.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress