diff options
author | Liam <towerofnix@gmail.com> | 2017-07-14 20:13:21 +0000 |
---|---|---|
committer | Liam <towerofnix@gmail.com> | 2017-07-14 20:13:21 +0000 |
commit | acc1a701f65926a6fb63ce3d445d9e19213a83c0 (patch) | |
tree | 68ba6d42f2a19a60b1943d83021ff8e0f89dce95 /src/http-music.js | |
parent | 2c150dfedba07b95334bbf2211739b5614e4949d (diff) |
Finish up restoring downloaders, maybe
Diffstat (limited to 'src/http-music.js')
-rwxr-xr-x | src/http-music.js | 18 |
1 files changed, 16 insertions, 2 deletions
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 ( |