diff options
author | Florrie <towerofnix@gmail.com> | 2018-06-26 12:01:43 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-06-26 12:01:45 -0300 |
commit | 992911a021e2f2cccfbc63e554a3f34bd997cd91 (patch) | |
tree | d0cfdce2b2a5b47b699befc830f8c0b204d19be5 /general-util.js | |
parent | 84ad73f638fe0b03e173b8ffb545d8edb43acc3c (diff) |
Pass YouTube playlist URLs directly to mtui
Or any other crawler argument, and it'll (try to) guess which crawler you want to use automatically. Handy!
Diffstat (limited to 'general-util.js')
-rw-r--r-- | general-util.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/general-util.js b/general-util.js index 2ce7ed4..7156274 100644 --- a/general-util.js +++ b/general-util.js @@ -1,6 +1,10 @@ const { spawn } = require('child_process') +const { promisify } = require('util') +const fs = require('fs') const npmCommandExists = require('command-exists') +const readFile = promisify(fs.readFile) + module.exports.promisifyProcess = function(proc, showLogging = true) { // Takes a process (from the child_process module) and returns a promise // that resolves when the process exits (or rejects, if the exit code is |