diff options
author | Florrie <towerofnix@gmail.com> | 2017-08-11 10:34:23 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2017-08-11 10:34:23 -0300 |
commit | fbd4233255c203a3fb21a610a15b078f95d92b18 (patch) | |
tree | 3c7b1cabddb4343b2e75806c32ea82af93117abe /src | |
parent | 2a15db9095ab0494c0cbaec9fbbf1fe11146306b (diff) |
Cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/pickers.js | 9 |
1 files changed, 3 insertions, 6 deletions
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() |