From fc4a2d3592c6f3587dd0025e1f53bbb46c6ad82d Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 4 Jul 2018 23:39:19 -0300 Subject: Open passed playlist in a new tab, allow passing more than one playlist --- index.js | 8 ++++---- 1 file 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 => { -- cgit 1.3.0-6-gf8a5