« get me outta code hell

Remove prototype picker - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2017-09-02 11:10:14 -0300
committerFlorrie <towerofnix@gmail.com>2017-09-02 11:10:14 -0300
commita2bf03ce944b83bef425df315e0055049990bd1f (patch)
tree8f790fe1911cf8b703e4782d77435e25a29bec23 /src
parent25cfd7a2180fd89f5701e19aa562875cd922ecee (diff)
Remove prototype picker
Diffstat (limited to 'src')
-rw-r--r--src/pickers2.js31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/pickers2.js b/src/pickers2.js
index 09b066d..1921e88 100644
--- a/src/pickers2.js
+++ b/src/pickers2.js
@@ -67,37 +67,6 @@ class HistoryManager {
   }
 }
 
-/*
-const createOrderedPicker = playlist => {
-  const flattened = flattenGrouplike(playlist)
-
-  return lastTrack => {
-    if (lastTrack === null) {
-      return flattened.items[0]
-    }
-
-    const index = flattened.items.indexOf(lastTrack)
-
-    // Technically, if the index is -1, flattened[0] will be automatically
-    // selected, but that isn't really obvious; handling it separately makes
-    // it clearer that when we're given a track that's not in the playlist,
-    // we just pick the first track in the entire playlist.
-    if (index === -1) {
-      return flattened.items[0]
-    }
-
-    // If we just played the last track, start back from the beginning.
-    if (index + 1 === flattened.items.length) {
-      return flattened.items[0]
-    }
-
-    // Otherwise, we just played some other track in the playlist, so we just
-    // pick the next track.
-    return flattened.items[index + 1]
-  }
-}
-*/
-
 function shuffleGroups(grouplike) {
   if (isGroup(grouplike) && grouplike.items.every(isGroup)) {
     const items = shuffleArray(grouplike.items.map(shuffleGroups))