--- Slim/Utils/Alarm.pm.alarm 2009-08-14 03:00:13.000000000 -0700 +++ Slim/Utils/Alarm.pm 2009-08-23 19:12:43.000000000 -0700 @@ -1269,6 +1269,26 @@ return $client->alarmData->{alarms}->{$id}; } +=head2 forgetClient( $client ) + +Clear alarms for a given client and unschedule the next alarm. This should be called +whenever a client is forgotten. + +=cut + +sub forgetClient { + my $class = shift; + my $client = shift; + + $log->debug('Forgetting saved alarms for ' . $client->name); + + $client->alarmData->{alarms} = {}; + + # Now that alarm list is cleared, this should handle clearing the + # nextAlarm and removing the timer + $class->scheduleNext($client); +} + =head2 loadAlarms( $client ) Load the alarms for a given client and schedule the next alarm. This should be called --- Slim/Player/Client.pm.alarm 2009-08-14 03:00:12.000000000 -0700 +++ Slim/Player/Client.pm 2009-08-23 19:16:54.000000000 -0700 @@ -554,6 +554,7 @@ Slim::Buttons::Input::Choice::forgetClient($client); Slim::Buttons::Playlist::forgetClient($client); Slim::Buttons::Search::forgetClient($client); + Slim::Utils::Alarm->forgetClient($client); Slim::Utils::Timers::forgetTimer($client); if ( !main::SLIM_SERVICE && !main::SCANNER ) {