From fbd4233255c203a3fb21a610a15b078f95d92b18 Mon Sep 17 00:00:00 2001 From: Florrie Date: Fri, 11 Aug 2017 10:34:23 -0300 Subject: Cleanup --- src/pickers.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src') 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