diff options
author | Florrie <towerofnix@gmail.com> | 2020-07-10 11:25:59 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2020-07-10 11:25:59 -0300 |
commit | c625099a05f4e4dd8b998a9469f016d649982b50 (patch) | |
tree | c1483cfb96e90429590e73de801e136e3cbcc565 | |
parent | 011004f9ac28c3a52c57ffb68ad0f0594095ea56 (diff) |
update old process.argv checks to use parseOptions
-rwxr-xr-x | index.js | 10 |
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 |