« get me outta code hell

http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
path: root/src/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/play.js')
-rwxr-xr-xsrc/play.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/play.js b/src/play.js
index efc60df..c955ce8 100755
--- a/src/play.js
+++ b/src/play.js
@@ -7,7 +7,6 @@ const clone = require('clone')
 const fs = require('fs')
 const fetch = require('node-fetch')
 const commandExists = require('./command-exists')
-const makePicker = require('./pickers')
 const startLoopPlay = require('./loop-play')
 const processArgv = require('./process-argv')
 const processSmartPlaylist = require('./smart-playlist')
@@ -337,8 +336,6 @@ async function main(args) {
   if (willPlay || (willPlay === null && shouldPlay)) {
     console.log(`Using sort: ${pickerSortMode} and loop: ${pickerLoopMode}.`)
 
-    const picker = makePicker(activePlaylist, pickerSortMode, pickerLoopMode)
-
     console.log(`Using ${playerCommand} player.`)
 
     const {
@@ -347,7 +344,11 @@ async function main(args) {
       downloadController,
       player
     } = await startLoopPlay(activePlaylist, {
-      picker, playerCommand,
+      pickerOptions: {
+        loop: pickerLoopMode,
+        sort: pickerSortMode
+      },
+      playerCommand,
       disablePlaybackStatus
     })