« get me outta code hell

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:
Diffstat (limited to 'index.js')
-rwxr-xr-xindex.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/index.js b/index.js
index f0cd4e3..444d579 100755
--- a/index.js
+++ b/index.js
@@ -65,9 +65,9 @@ async function main() {
         }
       }
     },
-    'player-options': {
-      type: 'series'
-    },
+    'player-options': {type: 'series'},
+    'stress-test': {type: 'flag'},
+    'telnet-server': {type: 'flag'},
     [parseOptions.handleDashless](option) {
       playlistSources.push(option)
     }
@@ -132,13 +132,13 @@ async function main() {
   const loadPlaylistPromise = loadPlaylists()
 
   let telnetServer
-  if (process.argv.includes('--telnet-server')) {
+  if (options['telnet-server']) {
     telnetServer = new TelnetServer(backend)
     await telnetServer.listen(1244)
     appElement.attachAsServerHost(telnetServer)
   }
 
-  if (process.argv.includes('--stress-test')) {
+  if (options['stress-test']) {
     await loadPlaylistPromise
 
     const w = 80