From fbd4233255c203a3fb21a610a15b078f95d92b18 Mon Sep 17 00:00:00 2001 From: Florrie Date: Fri, 11 Aug 2017 10:34:23 -0300 Subject: Cleanup --- man/http-music-play.1 | 7 +------ src/pickers.js | 9 +++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/man/http-music-play.1 b/man/http-music-play.1 index 9e4bc71..5e409ba 100644 --- a/man/http-music-play.1 +++ b/man/http-music-play.1 @@ -103,11 +103,6 @@ Opens a specific file to be used as the playlist file. (This sets the source playlist.) The default playlist file used upon loading is \fBplaylist.json\fR (in the same directory as \fBhttp-music\fR is being run in). -.TP -.BR \-\-picker ", " \-\-selector " \fIpickerType\fR" -Sets the picker type used for selecting tracks from the active playlist. -The default is \fBshuffle\fR. - .TP .BR \-p ", " \-\-play Forces the playlist to actually play, regardless of options such as \fB\-\-list\fR. See also \fB\-\-no\-play\fR. @@ -130,7 +125,7 @@ Removes a group from the (active) playlist. .TP .BR \-\-sort\-mode ", " \-\-sort Sets the mode by which the playback order list is sorted. -Valid options include \fBorder\fR, \fBshuffle\fR (the default), and \fBshuffle-top-level\fR (or \fBshuffle-groups\fR). +Valid options include \fBorder\fR, \fBshuffle\fR (the default), and \fBshuffle-groups\fR. See also \fB\-\-loop\-mode\fR. .TP diff --git a/src/pickers.js b/src/pickers.js index 2d8c631..190532c 100644 --- a/src/pickers.js +++ b/src/pickers.js @@ -31,20 +31,17 @@ function makePicker(grouplike, sort, loop) { const topLevel = {items: []} let generateTopLevel = () => { - if (sort === 'order') { + if (sort === 'order' || sort === 'ordered') { topLevel.items = flattenGrouplike(grouplike).items } - if (sort === 'shuffle') { + if (sort === 'shuffle' || sort === 'shuffled') { topLevel.items = shuffleArray(flattenGrouplike(grouplike).items) } - if (sort === 'shuffle-top-level' || sort === 'shuffle-groups') { - console.log(JSON.stringify(shuffleGroups(grouplike), null, 2)) + if (sort === 'shuffle-groups' || sort === 'shuffled-groups') { topLevel.items = flattenGrouplike(shuffleGroups(grouplike)).items } - - console.log(topLevel.items.map(require('./playlist-utils').getItemPathString).join('\n')) } generateTopLevel() -- cgit 1.3.0-6-gf8a5