[Slim-Checkins] r12046 - in /trunk/server/Slim: Buttons/AlarmClock.pm Player/Player.pm

andy at svn.slimdevices.com andy at svn.slimdevices.com
Fri May 18 10:16:05 PDT 2007


Author: andy
Date: Fri May 18 10:16:05 2007
New Revision: 12046

URL: http://svn.slimdevices.com?rev=12046&view=rev
Log:
Fix a couple alarm issues: Fade-in for the proper 20 seconds, not 400, stop fading if the user manually changed the volume

Modified:
    trunk/server/Slim/Buttons/AlarmClock.pm
    trunk/server/Slim/Player/Player.pm

Modified: trunk/server/Slim/Buttons/AlarmClock.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Buttons/AlarmClock.pm?rev=12046&r1=12045&r2=12046&view=diff
==============================================================================
--- trunk/server/Slim/Buttons/AlarmClock.pm (original)
+++ trunk/server/Slim/Buttons/AlarmClock.pm Fri May 18 10:16:05 2007
@@ -479,7 +479,9 @@
 				}
 
 				# fade volume over 20s if enabled.
-				$client->fade_volume($client->prefGet("alarmfadeseconds") * $FADESECONDS);
+				if ( $client->prefGet("alarmfadeseconds") ) {
+					$client->fade_volume( $FADESECONDS );
+				}
 
 				my $playlist = $client->prefGet("alarmplaylist", $day);
 				

Modified: trunk/server/Slim/Player/Player.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Player/Player.pm?rev=12046&r1=12045&r2=12046&view=diff
==============================================================================
--- trunk/server/Slim/Player/Player.pm (original)
+++ trunk/server/Slim/Player/Player.pm Fri May 18 10:16:05 2007
@@ -502,7 +502,12 @@
 sub _fadeVolumeUpdate {
 	my $client = shift;
 	my $f = shift;
-
+	
+	# If the user manually changed the volume, stop fading
+	if ( $f->{'vol'} && $f->{'vol'} != $client->volume ) {
+		return;
+	}
+	
 	my $now = Time::HiRes::time();
 
 	# new vol based on time since fade started to minise impact of timers firing late



More information about the checkins mailing list