diff options
Diffstat (limited to 'src/loop-play.js')
-rw-r--r-- | src/loop-play.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/loop-play.js b/src/loop-play.js index 50bca80..5205025 100644 --- a/src/loop-play.js +++ b/src/loop-play.js @@ -30,11 +30,10 @@ module.exports = async function loopPlay(picker, downloader, playArgs = []) { const [ title, downloaderArg ] = picked console.log(`Downloading ${title}..\nDownloader arg: ${downloaderArg}`) + const downloadFile = await downloader(downloaderArg) + const tempDir = tempy.directory() const wavFile = tempDir + `/.${sanitize(title)}.wav` - const downloadFile = tempDir + '/.dl-' + path.basename(downloaderArg) - - await downloader(downloaderArg, downloadFile) try { await convert(downloadFile, wavFile) |