From 01ef36b2b1a04702af697be6c4f3435537f06cc7 Mon Sep 17 00:00:00 2001 From: Florrie Date: Fri, 29 Jun 2018 21:57:00 -0300 Subject: Make youtube-dl files a little more sensible --- downloaders.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/downloaders.js b/downloaders.js index f0833e7..340abe6 100644 --- a/downloaders.js +++ b/downloaders.js @@ -117,19 +117,19 @@ const downloaders = { }), youtubedl: cachify('youtubedl', arg => { - const out = ( - tempy.directory() + '/download.' + downloaders.extension) + const outDir = tempy.directory() + const outFile = outDir + '/%(id)s-%(uploader)s-%(title)s.' + downloaders.extension const opts = [ '--quiet', '--extract-audio', '--audio-format', downloaders.extension, - '--output', out, + '--output', outFile, arg ] return promisifyProcess(spawn('youtube-dl', opts)) - .then(() => out) + .then(() => outDir) }), local: cachify('local', arg => { -- cgit 1.3.0-6-gf8a5