« get me outta code hell

Remove downloaders - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
path: root/src/http-music.js
diff options
context:
space:
mode:
authorliam4 <towerofnix@gmail.com>2017-06-26 23:16:11 -0300
committerliam4 <towerofnix@gmail.com>2017-06-26 23:16:11 -0300
commit0fcec41cd757adcd3c7f2f4c80b33141bb0a9bee (patch)
tree5ac2425d927f0624266a11433602f63f7eb9145e /src/http-music.js
parente56cdd69c330f2747c77b5db1595fddb6f6d1f10 (diff)
Remove downloaders
Diffstat (limited to 'src/http-music.js')
-rwxr-xr-xsrc/http-music.js28
1 files changed, 1 insertions, 27 deletions
diff --git a/src/http-music.js b/src/http-music.js
index 31f0dca..863d170 100755
--- a/src/http-music.js
+++ b/src/http-music.js
@@ -8,7 +8,6 @@ const { promisify } = require('util')
 const loopPlay = require('./loop-play')
 const processArgv = require('./process-argv')
 
-const downloaders = require('./downloaders')
 const pickers = require('./pickers')
 
 const {
@@ -23,7 +22,6 @@ Promise.resolve()
     let activePlaylist = null
 
     let pickerType = 'shuffle'
-    let downloaderType = 'http'
     let playOpts = []
 
     // WILL play says whether the user has forced playback via an argument.
@@ -221,14 +219,6 @@ Promise.resolve()
         pickerType = util.nextArg()
       },
 
-      '-downloader': function(util) {
-        // --downloader <downloader type>
-        // Selects the mode that songs will be downloaded with.
-        // See downloaders.js.
-
-        downloaderType = util.nextArg()
-      },
-
       '-play-opts': function(util) {
         // --play-opts <opts>
         // Sets command line options passed to the `play` command.
@@ -269,13 +259,7 @@ Promise.resolve()
         return
       }
 
-      let downloader = downloaders.getDownloader(downloaderType)
-      if (!downloader) {
-        console.error("Invalid downloader type: " + downloaderType)
-        return
-      }
-
-      const play = loopPlay(picker, downloader, playOpts)
+      const play = loopPlay(picker, playOpts)
 
       // We're looking to gather standard input one keystroke at a time.
       process.stdin.setRawMode(true)
@@ -328,16 +312,6 @@ Promise.resolve()
           play.skipCurrent()
         }
 
-        if (Buffer.from([0x7f]).equals(data)) { // Delete
-          clearConsoleLine()
-          console.log(
-            "Skipping the track that's up next. " +
-            "(Press I for track info!)"
-          )
-
-          play.skipUpNext()
-        }
-
         if (
           Buffer.from('i').equals(data) ||
           Buffer.from('t').equals(data)