From acc1a701f65926a6fb63ce3d445d9e19213a83c0 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 14 Jul 2017 20:13:21 +0000 Subject: Finish up restoring downloaders, maybe --- src/http-music.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/http-music.js') diff --git a/src/http-music.js b/src/http-music.js index bcd4672..a6c9479 100755 --- a/src/http-music.js +++ b/src/http-music.js @@ -284,7 +284,8 @@ Promise.resolve() const { promise: playPromise, - controller: play + playController: play, + downloadController } = loopPlay(picker, playOpts) // We're looking to gather standard input one keystroke at a time. @@ -335,7 +336,20 @@ Promise.resolve() "(Press I for track info!)" ) - play.skipCurrent() + play.skip() + } + + if (Buffer.from([0x7f]).equals(data)) { + clearConsoleLine() + console.log( + "Skipping the track that's up next. " + + "(Press I for track info!)" + ) + + // TODO: It would be nice to have this as a method of + // PlayController. + downloadController.cancel() + play.startNextDownload() } if ( -- cgit 1.3.0-6-gf8a5