Add to playlist feature in the 'shuffle' section
This commit is contained in:
+4
-1
@@ -166,6 +166,9 @@ public class RandomPlayQueueController extends ParameterizableViewController {
|
||||
// Handle the music folder filter
|
||||
List<MusicFolder> musicFolders = getMusicFolders(request);
|
||||
|
||||
// Do we add to the current playlist or do we replace it?
|
||||
boolean shouldAddToPlayList = ServletRequestUtils.getBooleanParameter(request, "addToPlaylist", false);
|
||||
|
||||
// Search the database using these criteria
|
||||
RandomSearchCriteria criteria = new RandomSearchCriteria(
|
||||
size,
|
||||
@@ -184,7 +187,7 @@ public class RandomPlayQueueController extends ParameterizableViewController {
|
||||
User user = securityService.getCurrentUser(request);
|
||||
Player player = playerService.getPlayer(request, response);
|
||||
PlayQueue playQueue = player.getPlayQueue();
|
||||
playQueue.addFiles(false, mediaFileService.getRandomSongs(criteria, user.getUsername()));
|
||||
playQueue.addFiles(shouldAddToPlayList, mediaFileService.getRandomSongs(criteria, user.getUsername()));
|
||||
|
||||
if (request.getParameter("autoRandom") != null) {
|
||||
playQueue.setRandomSearchCriteria(criteria);
|
||||
|
||||
+1
-1
@@ -233,7 +233,7 @@ more.random.text = Shuffle play
|
||||
more.random.songs = {0} songs
|
||||
more.random.auto = Play more random songs when end of play queue is reached.
|
||||
more.random.ok = OK
|
||||
more.random.add = Add
|
||||
more.random.add = Add to current playlist
|
||||
more.random.any = Any
|
||||
more.random.format = Format
|
||||
more.random.before = Before
|
||||
|
||||
@@ -172,9 +172,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="submit" name="actionOk" value="<fmt:message key="more.random.ok"/>">
|
||||
<input type="submit" name="actionAdd" value="<fmt:message key="more.random.add"/>">
|
||||
<td colspan="2">
|
||||
<input type="submit" value="<fmt:message key="more.random.ok"/>">
|
||||
<input type="checkbox" name="addToPlaylist" value="true"/> <fmt:message key="more.random.add"/>
|
||||
</td>
|
||||
</tr>
|
||||
<c:if test="${not model.clientSidePlaylist}">
|
||||
|
||||
Reference in New Issue
Block a user