« get me outta code hell

Make space pause (if a track is playing) - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/index.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2018-06-02 12:33:01 -0300
committerFlorrie <towerofnix@gmail.com>2018-06-02 12:33:01 -0300
commita5877baf3461d6607ccbe2755712bd790b62d8db (patch)
tree2613f208cebc6f4c7981249e20d9d2109beb358a /index.js
parentfdb9e4515eab49eb58976a387b6f7df16d388579 (diff)
Make space pause (if a track is playing)
Diffstat (limited to 'index.js')
-rw-r--r--index.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/index.js b/index.js
index a345301..ca62f17 100644
--- a/index.js
+++ b/index.js
@@ -1,7 +1,5 @@
 // omg I am tired of code
 
-const { getPlayer } = require('./players')
-const { getDownloaderFor } = require('./downloaders')
 const { AppElement } = require('./ui')
 const { updatePlaylistFormat } = require('./playlist-utils')
 const ansi = require('./tui-lib/util/ansi')
@@ -10,6 +8,11 @@ const EventEmitter = require('events')
 const Flushable = require('./tui-lib/util/Flushable')
 const Root = require('./tui-lib/ui/Root')
 
+// Hack to get around errors when piping many things to stdout/err
+// (from general-util promisifyProcess)
+process.stdout.setMaxListeners(Infinity)
+process.stderr.setMaxListeners(Infinity)
+
 process.on('unhandledRejection', error => {
   console.error(error.stack)
   process.exit(1)
@@ -55,7 +58,7 @@ async function main() {
     ]
   }
 
-  grouplike = require('./library.json')
+  grouplike = require(process.argv[2] || './library.json')
 
   grouplike = updatePlaylistFormat(grouplike)