From 9a3b488fd91291e6ff848145d83fb7552b6bd398 Mon Sep 17 00:00:00 2001 From: Florrie Date: Fri, 25 Aug 2017 16:36:37 -0300 Subject: Hide playback status --- src/play.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/play.js') diff --git a/src/play.js b/src/play.js index 5d41bb9..efc60df 100755 --- a/src/play.js +++ b/src/play.js @@ -62,7 +62,6 @@ async function main(args) { let pickerSortMode = 'shuffle' let pickerLoopMode = 'loop-regenerate' let playerCommand = await determineDefaultPlayer() - let playOpts = [] // WILL play says whether the user has forced playback via an argument. // SHOULD play says whether the program has automatically decided to play @@ -70,6 +69,8 @@ async function main(args) { let shouldPlay = true let willPlay = null + let disablePlaybackStatus = false + async function openPlaylist(arg, silent = false) { let playlistText @@ -310,7 +311,17 @@ async function main(args) { // installed on your system. playerCommand = util.nextArg() - } + }, + + '-disable-playback-status': function() { + // --disable-playback-status (alias: --hide-playback-status) + // Hides the playback status line. + + console.log("Not showing playback status.") + disablePlaybackStatus = true + }, + + '-hide-playback-status': util => util.alias('-disable-playback-status') } await openPlaylist('./playlist.json', true) @@ -335,7 +346,10 @@ async function main(args) { playController, downloadController, player - } = await startLoopPlay(activePlaylist, picker, playerCommand, playOpts) + } = await startLoopPlay(activePlaylist, { + picker, playerCommand, + disablePlaybackStatus + }) // We're looking to gather standard input one keystroke at a time. // But that isn't *always* possible, e.g. when piping into the http-music -- cgit 1.3.0-6-gf8a5