From 0fcec41cd757adcd3c7f2f4c80b33141bb0a9bee Mon Sep 17 00:00:00 2001 From: liam4 Date: Mon, 26 Jun 2017 23:16:11 -0300 Subject: Remove downloaders --- src/http-music.js | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'src/http-music.js') 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 - // Selects the mode that songs will be downloaded with. - // See downloaders.js. - - downloaderType = util.nextArg() - }, - '-play-opts': function(util) { // --play-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) -- cgit 1.3.0-6-gf8a5