Bug 1445 - Powering off players should cancel sleep
: Powering off players should cancel sleep
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: unspecified
: All All
: P1 minor (vote)
: ---
Assigned To: Vidur Apparao
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-26 14:10 UTC by Fred
Modified: 2008-09-15 14:37 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fred 2005-04-26 14:10:52 UTC
Powering off a player should cancel its sleep setting. Right now sleep stays active. I have a patch.

Index: server/Slim/Control/Command.pm
===============================================================
====
--- server/Slim/Control/Command.pm      (revision 3081)
+++ server/Slim/Control/Command.pm      (working copy)
@@ -745,6 +745,14 @@
                                }
 
                                $client->power($p1);
+
+                               if ($p1 eq "0") {
+                               # Powering off cancels sleep...
+                                       Slim::Utils::Timers::killTimers($client, \&sleepStartFade);
+                                       Slim::Utils::Timers::killTimers($client, \&sleepPowerOff);
+                                       $client->sleepTime(0);
+                                       $client->currentSleepTime(0);
+                               }
                        }
 
                } elsif ($p0 eq "sync") {
Comment 1 KDF 2005-04-26 14:14:43 UTC
bugs with patches, best kind of report...
Comment 2 KDF 2005-04-27 00:42:51 UTC
committed at change 3086 for 6.1, not considered required for 6.0.2
Comment 3 Chris Owens 2006-06-16 14:42:00 UTC
There are 536 bugs in the database with targets of '---' that were fixed prior to new year 2006.  I am setting them to targets of 6.2.1 to keep them from showing up in my queries.