From 2ec0349909be5c8cca63008f18603555493b95d9 Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 24 Jan 2018 17:19:20 -0400 Subject: Add --playlist-string alias, update man page --- man/http-music-play.1 | 5 +++++ src/play.js | 2 ++ todo.txt | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/man/http-music-play.1 b/man/http-music-play.1 index 9c6b927..7c77c5b 100644 --- a/man/http-music-play.1 +++ b/man/http-music-play.1 @@ -150,6 +150,11 @@ Opens a specific file to be used as the playlist file. (This sets the source playlist.) The default playlist file used upon loading is \fBplaylist.json\fR (in the same directory as \fBhttp-music\fR is being run in). +.TP +.BR \-\-open\-playlist\-string ", " \-\-playlist\-string " \fIplaylistString\fR" +Loads a playlist directly from the passed string, which should be the JSON text of a playlist. +(This sets the source playlist.) + .TP .BR \-p ", " \-\-play Forces the playlist to actually play, regardless of options such as \fB\-\-list\fR. See also \fB\-\-no\-play\fR. diff --git a/src/play.js b/src/play.js index 788f6bc..75099f9 100755 --- a/src/play.js +++ b/src/play.js @@ -235,6 +235,8 @@ async function main(args) { await loadPlaylist(JSON.parse(util.nextArg())) }, + '-playlist-string': util => util.alias('-open-playlist-string'), + '-write-playlist': function(util) { // --write-playlist (alias: --write, -w, --save) // Writes the active playlist to a file. This file can later be used diff --git a/todo.txt b/todo.txt index 4fc7366..06f1c51 100644 --- a/todo.txt +++ b/todo.txt @@ -423,4 +423,4 @@ TODO: Make process-metadata work with non-local tracks, somehow... TODO: Make process-metadata work nicely with smart playlists, somehow... TODO: A way (key, option) to change the "/ duration" text in the status bar to - "- remaining". + "- remaining". This would work very nicely with the >/< status bar idea. -- cgit 1.3.0-6-gf8a5