diff options
author | Liam <towerofnix@gmail.com> | 2017-07-15 11:45:55 -0400 |
---|---|---|
committer | Liam <towerofnix@gmail.com> | 2017-07-15 11:45:55 -0400 |
commit | 0daee54085810797eea235b513b8357636cda49f (patch) | |
tree | 6118678e6823497bf5baa133d7a94749d9c3b3e2 /src/loop-play.js | |
parent | acc1a701f65926a6fb63ce3d445d9e19213a83c0 (diff) |
Begin updating the playlist format
Diffstat (limited to 'src/loop-play.js')
-rw-r--r-- | src/loop-play.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/loop-play.js b/src/loop-play.js index 8ca4ae4..701e590 100644 --- a/src/loop-play.js +++ b/src/loop-play.js @@ -93,10 +93,8 @@ class PlayController { if (picked === null) { return null } else { - // TODO: Is there a function for this? - const arg = picked[1] - const downloader = getDownloaderFor(arg) - this.downloadController.download(downloader, arg) + const downloader = getDownloaderFor(picked.downloaderArg) + this.downloadController.download(downloader, picked.downloaderArg) return picked } } @@ -223,15 +221,15 @@ class PlayController { logTrackInfo() { if (this.currentTrack) { - const [ title, arg ] = this.currentTrack - console.log(`Playing: \x1b[1m${title} \x1b[2m${arg}\x1b[0m`) + const t = this.currentTrack + console.log(`Playing: \x1b[1m${t.name} \x1b[2m${t.downloaderArg}\x1b[0m`) } else { console.log("No song currently playing.") } if (this.nextTrack) { - const [ title, arg ] = this.nextTrack - console.log(`Up next: \x1b[1m${title} \x1b[2m${arg}\x1b[0m`) + const t = this.nextTrack + console.log(`Up next: \x1b[1m${t.name} \x1b[2m${t.downloaderArg}\x1b[0m`) } else { console.log("No song up next.") } |