Index: Slim/Utils/Alarms.pm =================================================================== --- Slim/Utils/Alarms.pm (revision 17367) +++ Slim/Utils/Alarms.pm (working copy) @@ -16,7 +16,7 @@ my $prefs = preferences('server'); -my %possibleSpecialPlaylistsIDs = ( +our %possibleSpecialPlaylistsIDs = ( 'CURRENT_PLAYLIST' => -1, 'PLUGIN_RANDOM_TRACK' => -2, 'PLUGIN_RANDOM_ALBUM' => -3, @@ -161,6 +161,17 @@ $self->playlist($playlistObj->url); return $newvalue; + } else { + + for my $playlist (keys %possibleSpecialPlaylistsIDs) { + + if ($possibleSpecialPlaylistsIDs{$playlist} == $newvalue) { + + $self->playlist($playlist); + return $newvalue; + } + + } } } else { Index: Slim/Control/Jive.pm =================================================================== --- Slim/Control/Jive.pm (revision 17367) +++ Slim/Control/Jive.pm (working copy) @@ -197,6 +197,7 @@ titleStyle => 'internetradio', }, }, + { text => Slim::Utils::Strings::string('MUSIC_SERVICES'), id => 'ondemand', @@ -947,12 +948,13 @@ my @allPlaylists = ( { text => Slim::Utils::Strings::string("CURRENT_PLAYLIST"), - radio => ($alarm_playlist == -1) + 0, # 0 is added to force the data type to number + radio => (defined $alarm_playlist && $Slim::Utils::Alarms::possibleSpecialPlaylistsIDs{$alarm_playlist} == -1) + 0, # 0 is added to force the data type to number actions => { do => { player => 0, - cmd => ['alarms'], + cmd => ['alarm'], params => { + cmd => 'set', playlist_id => '-1', dow => $day, }, @@ -961,12 +963,13 @@ }, { text => Slim::Utils::Strings::string("PLUGIN_RANDOM_TRACK"), - radio => ($alarm_playlist == -2) + 0, # 0 is added to force the data type to number + radio => (defined $alarm_playlist && $Slim::Utils::Alarms::possibleSpecialPlaylistsIDs{$alarm_playlist} == -2) + 0, # 0 is added to force the data type to number actions => { do => { player => 0, - cmd => ['alarms'], + cmd => ['alarm'], params => { + cmd => 'set', playlist_id => '-2', dow => $day, }, @@ -975,12 +978,13 @@ }, { text => Slim::Utils::Strings::string("PLUGIN_RANDOM_ALBUM"), - radio => ($alarm_playlist == -3) + 0, # 0 is added to force the data type to number + radio => (defined $alarm_playlist && $Slim::Utils::Alarms::possibleSpecialPlaylistsIDs{$alarm_playlist} == -3) + 0, # 0 is added to force the data type to number actions => { do => { player => 0, - cmd => ['alarms'], + cmd => ['alarm'], params => { + cmd => 'set', playlist_id => '-3', dow => $day, }, @@ -989,12 +993,13 @@ }, { text => Slim::Utils::Strings::string("PLUGIN_RANDOM_CONTRIBUTOR"), - radio => ($alarm_playlist == -4) + 0, # 0 is added to force the data type to number + radio => (defined $alarm_playlist && $Slim::Utils::Alarms::possibleSpecialPlaylistsIDs{$alarm_playlist} == -4) + 0, # 0 is added to force the data type to number actions => { do => { player => 0, - cmd => ['alarms'], + cmd => ['alarm'], params => { + cmd => 'set', playlist_id => '-4', dow => $day, }, @@ -1261,6 +1266,7 @@ go => { cmd => ['albums'], params => { + sort => 'artflow', menu => 'track', }, },