diff options
Diffstat (limited to 'downloaders.js')
-rw-r--r-- | downloaders.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/downloaders.js b/downloaders.js index 4c1ce38..e18c8e0 100644 --- a/downloaders.js +++ b/downloaders.js @@ -6,6 +6,7 @@ const mkdirp = promisify(require('mkdirp')) const fs = require('fs') const fetch = require('node-fetch') const tempy = require('tempy') +const os = require('os') const path = require('path') const sanitize = require('sanitize-filename') @@ -104,8 +105,7 @@ const removeFileProtocol = arg => { const downloaders = { extension: 'mp3', // Generally target file extension, used by youtube-dl - // TODO: Cross-platform stuff - rootCacheDir: process.env.HOME + '/.mtui/downloads', + rootCacheDir: os.homedir() + '/.mtui/downloads', http: cachify('http', arg => { |