Commit 1c2d2ac9cf02

Vincent Demeester <vincent@sbr.pm>
2026-09-14 12:21:32
fix(emacs): supported empv selection callback
Accepted empv's continuation callback so custom Subsonic handlers remained compatible after its API update. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 659687a
Changed files (1)
dots
config
emacs
dots/config/emacs/init.el
@@ -3570,7 +3570,7 @@ With \\[universal-argument] \\[universal-argument]: always prompt with completio
   ;; Extend act-on-candidate to handle playlist kind
   ;; Fetches playlist tracks via getPlaylist and enqueues all songs
   (advice-add 'empv--subsonic-act-on-candidate :around
-              (lambda (orig selected)
+              (lambda (orig selected &optional on-quit)
                 (if (eq (alist-get 'kind selected) 'playlist)
                     (let ((id (alist-get 'id selected))
                           (name (alist-get 'name selected)))
@@ -3596,7 +3596,7 @@ With \\[universal-argument] \\[universal-argument]: always prompt with completio
                                                       (map-insert 'type 'subsonic)))
                                                   songs))))
                              (message "Playlist '%s' is empty" name))))))
-                  (funcall orig selected))))
+                  (funcall orig selected on-quit))))
 
   (defun empv-subsonic-playlists ()
     "List Subsonic playlists and act on selection."
@@ -3626,13 +3626,13 @@ With \\[universal-argument] \\[universal-argument]: always prompt with completio
   ;; Extend act-on-candidate to handle radio kind
   ;; Radio stations have a direct streamUrl, no need to fetch sub-items
   (advice-add 'empv--subsonic-act-on-candidate :around
-              (lambda (orig selected)
+              (lambda (orig selected &optional on-quit)
                 (if (eq (alist-get 'kind selected) 'radio)
                     (let ((url (alist-get 'streamUrl selected)))
                       (if url
                           (empv-play url)
                         (message "Radio '%s' has no stream URL" (alist-get 'name selected))))
-                  (funcall orig selected))))
+                  (funcall orig selected on-quit))))
 
   (defun empv-subsonic-radios ()
     "List Subsonic internet radio stations and play selection."