diff options
author | Florrie <towerofnix@gmail.com> | 2018-07-04 23:39:19 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-07-04 23:39:19 -0300 |
commit | fc4a2d3592c6f3587dd0025e1f53bbb46c6ad82d (patch) | |
tree | b1546d8cfdc3b0ca8c546e52f1ca3967139dee1b | |
parent | bf6f1ec9d724ae144c8be682821f3660a257767f (diff) |
Open passed playlist in a new tab, allow passing more than one playlist
-rwxr-xr-x | index.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/index.js b/index.js index 7ecccc7..3d7adf8 100755 --- a/index.js +++ b/index.js @@ -71,10 +71,6 @@ async function main() { root.select(appElement) - if (process.argv[2]) { - appElement.handlePlaylistSource(process.argv[2]) - } - const flushable = new Flushable(process.stdout, true) flushable.resizeScreen(size) flushable.shouldShowCompressionStatistics = process.argv.includes('--show-ansi-stats') @@ -85,6 +81,10 @@ async function main() { root.renderTo(flushable) flushable.flush() }, 50) + + for (let i = 2; i < process.argv.length; i++) { + await appElement.handlePlaylistSource(process.argv[i], true) + } } main().catch(err => { |