diff options
Diffstat (limited to 'index.js')
-rwxr-xr-x | index.js | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/index.js b/index.js index 59c91ec..694a384 100755 --- a/index.js +++ b/index.js @@ -65,31 +65,16 @@ async function main() { source: ['crawl-local', process.env.HOME + '/Music'] } - if (process.argv[2]) { - console.log('Opening playlist...') - - const crawlers = getAllCrawlersForArg(process.argv[2]) - - if (crawlers.length === 0) { - console.error(`No suitable playlist crawler for "${process.argv[2]}".`) - process.exit(1) - } - - const crawler = crawlers[0] - - if (crawlers.length > 1) { - console.warn(`More than one suitable crawler for "${process.argv[2]}" - using ${crawler.name}.`) - } - - grouplike = await crawler(process.argv[2]) - } - grouplike = await processSmartPlaylist(grouplike) appElement.grouplikeListingElement.loadGrouplike(grouplike) root.select(appElement.form) + 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') |