home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
Watch / Listen Media
Television (MyTV frontend and TV-Server)
TV Server xmltv IWakeupHandler Bug
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="dcapslock" data-source="post: 1252236" data-attributes="member: 154757"><p>I suspect non one relies on the fact that PowerScheduler IWakupHandler has a bug, but I am a pureist so when I saw the log below I went searching...</p><p></p><p style="margin-left: 20px">[2019-01-02 20:40:45,655] [Log ] [PS StandbyWakeup] [DEBUG] - PS: StandbyWakeupThread triggered by check interval</p> <p style="margin-left: 20px">[2019-01-02 20:40:45,660] [Log ] [PS StandbyWakeup] [DEBUG] - PS: LoadSettings()</p> <p style="margin-left: 20px">[2019-01-02 20:40:45,687] [Log ] [PS StandbyWakeup] [DEBUG] - PS: SetWakeupTimer()</p> <p style="margin-left: 20px">[2019-01-02 20:40:45,697] [Log ] [PS StandbyWakeup] [DEBUG] - PS: Inspecting Scheduled Recordings: 1/3/2019 5:58:00 PM</p> <p style="margin-left: 20px"><strong>[2019-01-02 20:40:45,700] [Log ] [PS StandbyWakeup] [DEBUG] - XmlTvImport.GetNextWakeupTime 1/2/2019 6:00:00 AM</strong></p> <p style="margin-left: 20px">[2019-01-02 20:40:45,714] [Log ] [PS StandbyWakeup] [DEBUG] - PS: Set wakeup timer to wakeup system at 1/3/2019 5:57:00 PM</p> <p style="margin-left: 20px">[2019-01-02 20:40:45,715] [Log ] [PS StandbyWakeup] [DEBUG] - PS: CheckForStandby()</p> <p style="margin-left: 20px">[2019-01-02 20:40:45,727] [Log ] [PS StandbyWakeup] [DEBUG] - PS: Inspecting Client Plugin (Media playing): StandbyPrevented</p> <p style="margin-left: 20px">[2019-01-02 20:40:45,731] [Log ] [PS StandbyWakeup] [DEBUG] - PS: SetStandbyMode(StandbyPrevented)</p> <p style="margin-left: 20px">[2019-01-02 20:40:45,732] [Log ] [PS StandbyWakeup] [DEBUG] - PS: System is busy and should not go to standby</p><p></p><p>Yep, the handler is returning a time in the past!</p><p></p><p>Now if test this then it works... (sorry no log). What is going on?</p><p></p><p>Well the code check for adding a day does not set the result to a variable.</p><p></p><p style="margin-left: 20px"> if ((now < remoteScheduleTime) && (remoteScheduleTime > DateTime.MinValue))</p> <p style="margin-left: 20px"> {</p> <p style="margin-left: 20px"> remoteScheduleTime.AddDays(1);</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> Log.Debug(this._handlerName + ".GetNextWakeupTime {0}", remoteScheduleTime);</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> remoteScheduleTime.AddMinutes(-1); // resume 60sec before </p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> return remoteScheduleTime;</p> <p style="margin-left: 20px"> </p><p></p><p><a href="https://github.com/MediaPortal/MediaPortal-1/blob/e9ee9568610d8be711699d96ef2328924e9cc702/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/XmlTvImportWakeupHandler.cs#L89-L99" target="_blank">MediaPortal/MediaPortal-1</a></p><p></p><p>Poor early .Net doco may give an out... <a href="https://stackoverflow.com/questions/11583601/datetime-adddays-not-working-as-expected" target="_blank">DateTime.AddDays() not working as expected</a></p><p></p><p>In the end testing an outcome (future on the same day) works, but having a test case of earlier time of day, then checking logs would have picked this up.</p><p></p><p>Would love to fix but alas I don't have an MP Build suite set up.</p><p></p><p>Cheers</p><p></p><p>Darryn</p><p style="margin-left: 20px"><p style="margin-left: 20px"></p> </p></blockquote><p></p>
[QUOTE="dcapslock, post: 1252236, member: 154757"] I suspect non one relies on the fact that PowerScheduler IWakupHandler has a bug, but I am a pureist so when I saw the log below I went searching... [INDENT][2019-01-02 20:40:45,655] [Log ] [PS StandbyWakeup] [DEBUG] - PS: StandbyWakeupThread triggered by check interval [2019-01-02 20:40:45,660] [Log ] [PS StandbyWakeup] [DEBUG] - PS: LoadSettings() [2019-01-02 20:40:45,687] [Log ] [PS StandbyWakeup] [DEBUG] - PS: SetWakeupTimer() [2019-01-02 20:40:45,697] [Log ] [PS StandbyWakeup] [DEBUG] - PS: Inspecting Scheduled Recordings: 1/3/2019 5:58:00 PM [B][2019-01-02 20:40:45,700] [Log ] [PS StandbyWakeup] [DEBUG] - XmlTvImport.GetNextWakeupTime 1/2/2019 6:00:00 AM[/B] [2019-01-02 20:40:45,714] [Log ] [PS StandbyWakeup] [DEBUG] - PS: Set wakeup timer to wakeup system at 1/3/2019 5:57:00 PM [2019-01-02 20:40:45,715] [Log ] [PS StandbyWakeup] [DEBUG] - PS: CheckForStandby() [2019-01-02 20:40:45,727] [Log ] [PS StandbyWakeup] [DEBUG] - PS: Inspecting Client Plugin (Media playing): StandbyPrevented [2019-01-02 20:40:45,731] [Log ] [PS StandbyWakeup] [DEBUG] - PS: SetStandbyMode(StandbyPrevented) [2019-01-02 20:40:45,732] [Log ] [PS StandbyWakeup] [DEBUG] - PS: System is busy and should not go to standby[/INDENT] Yep, the handler is returning a time in the past! Now if test this then it works... (sorry no log). What is going on? Well the code check for adding a day does not set the result to a variable. [INDENT] if ((now < remoteScheduleTime) && (remoteScheduleTime > DateTime.MinValue)) { remoteScheduleTime.AddDays(1); } Log.Debug(this._handlerName + ".GetNextWakeupTime {0}", remoteScheduleTime); remoteScheduleTime.AddMinutes(-1); // resume 60sec before return remoteScheduleTime; [/INDENT] [URL="https://github.com/MediaPortal/MediaPortal-1/blob/e9ee9568610d8be711699d96ef2328924e9cc702/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/XmlTvImportWakeupHandler.cs#L89-L99"]MediaPortal/MediaPortal-1[/URL] Poor early .Net doco may give an out... [URL="https://stackoverflow.com/questions/11583601/datetime-adddays-not-working-as-expected"]DateTime.AddDays() not working as expected[/URL] In the end testing an outcome (future on the same day) works, but having a test case of earlier time of day, then checking logs would have picked this up. Would love to fix but alas I don't have an MP Build suite set up. Cheers Darryn [INDENT][INDENT][/INDENT][/INDENT] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
Watch / Listen Media
Television (MyTV frontend and TV-Server)
TV Server xmltv IWakeupHandler Bug
Contact us
RSS
Top
Bottom