« get me outta code hell

Add --playlist-string alias, update man page - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2018-01-24 17:19:20 -0400
committerFlorrie <towerofnix@gmail.com>2018-01-24 17:19:20 -0400
commit2ec0349909be5c8cca63008f18603555493b95d9 (patch)
tree2278fa2c567def1a3cba73d64b3a295277b77c45
parent8b26455db6af055b0ed09d8494a62e5d99f04975 (diff)
Add --playlist-string alias, update man page
-rw-r--r--man/http-music-play.15
-rwxr-xr-xsrc/play.js2
-rw-r--r--todo.txt2
3 files changed, 8 insertions, 1 deletions
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
@@ -151,6 +151,11 @@ Opens a specific file to be used as the playlist file.
 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 <file>  (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.