emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/mpv 9fc833bf34 12/12: Rename mpv-enqueue to mpv-playlist-a


From: ELPA Syncer
Subject: [nongnu] elpa/mpv 9fc833bf34 12/12: Rename mpv-enqueue to mpv-playlist-append and simplify
Date: Mon, 1 Aug 2022 09:58:52 -0400 (EDT)

branch: elpa/mpv
commit 9fc833bf348cbea0b386801fb333e7b323bed0f6
Author: Johann Klähn <johann@jklaehn.de>
Commit: Johann Klähn <johann@jklaehn.de>

    Rename mpv-enqueue to mpv-playlist-append and simplify
---
 mpv.el | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/mpv.el b/mpv.el
index 2988a60c30..c8eff4d293 100644
--- a/mpv.el
+++ b/mpv.el
@@ -462,17 +462,18 @@ See `mpv-start' if you need to pass further arguments and
   (mpv-start (expand-file-name path)))
 
 ;;;###autoload
-(defun mpv-enqueue (url &rest args)
-  "Enqueue URL to the current mpv playlist and optionally set ARGS."
+(defun mpv-playlist-append (url &rest args)
+  "Append URL to the current mpv playlist.
+
+If ARGS are provided, they are passed as per-file options to mpv."
   (interactive "sURL: ")
-  (if args
-      (mpv-run-command "loadfile" url "append"
-                       (string-join
-                        (mapcar (lambda (arg)
-                                  (substring arg 2))
-                                args)
-                        ","))
-    (mpv-run-command "loadfile" url "append"))
+  (mpv-run-command "loadfile" url "append"
+                   (string-join
+                    (mapcar (lambda (arg)
+                              (string-trim-left arg "--"))
+                            args)
+                    ","))
+
   (thread-last
     (mpv-get-property "playlist-count")
     1-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]