From 3b84dc71da84264a78c4594db592e99f509a6499 Mon Sep 17 00:00:00 2001 From: Florrie Date: Tue, 8 Aug 2017 19:56:00 -0300 Subject: Only create one converter per instance of DownloadController This also makes the message "using (ffmpeg|avconv) converter" appear once (upon startup). --- src/play.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/play.js') diff --git a/src/play.js b/src/play.js index 6b9f26c..680e326 100755 --- a/src/play.js +++ b/src/play.js @@ -8,7 +8,7 @@ const fs = require('fs') const fetch = require('node-fetch') const commandExists = require('./command-exists') const pickers = require('./pickers') -const loopPlay = require('./loop-play') +const startLoopPlay = require('./loop-play') const processArgv = require('./process-argv') const processSmartPlaylist = require('./smart-playlist') @@ -326,7 +326,7 @@ async function main(args) { playController, downloadController, player - } = loopPlay(activePlaylist, picker, playerCommand, playOpts) + } = await startLoopPlay(activePlaylist, picker, playerCommand, playOpts) // We're looking to gather standard input one keystroke at a time. // But that isn't *always* possible, e.g. when piping into the http-music -- cgit 1.3.0-6-gf8a5