« get me outta code hell

Cleanup - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2017-08-11 10:34:23 -0300
committerFlorrie <towerofnix@gmail.com>2017-08-11 10:34:23 -0300
commitfbd4233255c203a3fb21a610a15b078f95d92b18 (patch)
tree3c7b1cabddb4343b2e75806c32ea82af93117abe
parent2a15db9095ab0494c0cbaec9fbbf1fe11146306b (diff)
Cleanup
-rw-r--r--man/http-music-play.17
-rw-r--r--src/pickers.js9
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
@@ -104,11 +104,6 @@ Opens a specific file to be used as the playlist file.
 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()