Fix a possible stacktrace on RandomPlayQueue

master
jvoisin 6 years ago committed by GitHub
commit 4263d59940
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      airsonic-main/src/main/java/org/airsonic/player/controller/RandomPlayQueueController.java

@ -62,7 +62,7 @@ public class RandomPlayQueueController {
ModelMap model, ModelMap model,
HttpServletRequest request, HttpServletRequest request,
HttpServletResponse response, HttpServletResponse response,
@RequestParam(value = "size") int size, @RequestParam(value = "size") Integer size,
@RequestParam(value = "genre", required = false) String genre, @RequestParam(value = "genre", required = false) String genre,
@RequestParam(value = "year", required = false) String year, @RequestParam(value = "year", required = false) String year,
@RequestParam(value = "songRating", required = false) String songRating, @RequestParam(value = "songRating", required = false) String songRating,
@ -87,6 +87,10 @@ public class RandomPlayQueueController {
boolean doesShowStarredSongs = false; boolean doesShowStarredSongs = false;
boolean doesShowUnstarredSongs = false; boolean doesShowUnstarredSongs = false;
if (size == null) {
size = 24;
}
// Handle the genre filter // Handle the genre filter
if (StringUtils.equalsIgnoreCase("any", genre)) { if (StringUtils.equalsIgnoreCase("any", genre)) {
genre = null; genre = null;

Loading…
Cancel
Save