diff options
-rw-r--r-- | downloaders.js | 8 |
1 files 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 => { |