Index: Slim/Utils/Alarm.pm =================================================================== --- Slim/Utils/Alarm.pm (revision 23187) +++ Slim/Utils/Alarm.pm (working copy) @@ -63,6 +63,9 @@ my $DEF_ALARM_SCREENSAVER = 'SCREENSAVER.datetime'; my $alarmScreensaver = $DEF_ALARM_SCREENSAVER; +# URL to use when an alarm sound fails to play and we're connected to SN +my $SN_FALLBACK_SOUND = 'loop://www.squeezenetwork.com/static/sounds/effects/steam_train_whistle.mp3'; + # Hash storing the playlists that alarms can use. Keys are playlist URLs. Values are the string descriptions for each URL. # Values that should be passed through client->string are surrounded with curly braces. # e.g. @@ -1026,11 +1029,17 @@ $log->debug('Starting fallback sounds'); # Would be nice to have some alarm tones to fall back to (Bug 8499). For now, just - # grab 10 random tracks and play them - $log->debug('Playing 10 random tracks'); - my @tracks = Slim::Schema->rs('track')->search({audio => 1}, {rows => 10, order_by => \'RAND()'})->all; - my $request = $client->execute(['playlist', 'loadtracks', 'listRef', \@tracks ]); - $request->source('ALARM'); + # grab 10 random tracks and play them or use a sound effect if on SN + if (main::SLIM_SERVICE) { + $log->debug("Playing $SN_FALLBACK_SOUND"); + my $request = $client->execute(['playlist', 'play', $SN_FALLBACK_SOUND]); + $request->source('ALARM'); + } else { + $log->debug('Playing 10 random tracks'); + my @tracks = Slim::Schema->rs('track')->search({audio => 1}, {rows => 10, order_by => \'RAND()'})->all; + my $request = $client->execute(['playlist', 'loadtracks', 'listRef', \@tracks ]); + $request->source('ALARM'); + } if ( $prefs->client($client)->get('alarmfadeseconds') ) { $log->debug('Fading volume');