wrong-type-argument consp :int64 when using emms-mpris.el

Sheng Wang <[email protected]>
Newsgroups gmane.emacs.emms.user
Message-ID <[email protected]>
Without the attached patch mpris integration doesn't work on my setup.
Actions like "Next" and "Previous" doesn't work, showing
"wrong-type-argument consp :int64" in minibuffer.

Does this happen to you too?


Tried on both Emacs 28 and the latest master branch, on nixos-unstable KDE 5.26.5.
dbus-daemon --version shows 1.14.4

Steps to reproduce:

(toggle-debug-on-error)
(emms-mpris-enable)

Debugger entered--Lisp error: (wrong-type-argument consp :int64)
  dbus-message-internal(2 :session ":1.53" 16780 :variant :int64 0)
  dbus-method-return-internal(:session ":1.53" 16780 :variant :int64 0)
  apply(dbus-method-return-internal :session ":1.53" 16780 (:variant :int64 0))
  dbus-handle-event((dbus-event :session 1 16780 ":1.53" "org.mpris.MediaPlayer2.emms" "/org/mpris/MediaPlayer2" "org.freedesktop.DBus.Properties" "Get" emms-mpris-get-property-handler (:string "org.mpris.MediaPlayer2.Player") (:string "Position")))
  funcall-interactively(dbus-handle-event (dbus-event :session 1 16780 ":1.53" "org.mpris.MediaPlayer2.emms" "/org/mpris/MediaPlayer2" "org.freedesktop.DBus.Properties" "Get" emms-mpris-get-property-handler (:string "org.mpris.MediaPlayer2.Player") (:string "Position")))
  command-execute(dbus-handle-event nil [(dbus-event :session 1 16780 ":1.53" "org.mpris.MediaPlayer2.emms" "/org/mpris/MediaPlayer2" "org.freedesktop.DBus.Properties" "Get" emms-mpris-get-property-handler (:string "org.mpris.MediaPlayer2.Player") (:string "Position"))] t)
mpris.patch (text/x-patch, 551 B)
diff --git a/emms-mpris.el b/emms-mpris.el
index 6c5bd92..b2e3b1f 100644
--- a/emms-mpris.el
+++ b/emms-mpris.el
@@ -305,8 +305,8 @@ which evaluates to that value or the value itself."
   (let* ((last-input-event last-input-event)
 	 (prop (cadr args)))
     (if (string-equal prop "Position")
-	(list :variant :int64
-	      (emms-mpris-sec-to-musec emms-playing-time))
+	(list (list :variant :int64
+	            (emms-mpris-sec-to-musec emms-playing-time)))
       (apply #'dbus-property-handler args))))

 (defvar emms-mpris-properties-iface-spec
publickey - [email protected] - e0b3e13f.asc (application/pgp-keys, 628 B)
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GopenPGP 2.4.7
Comment: https://gopenpgp.org

xjMEXRdFDBYJKwYBBAHaRw8BAQdAc/CpTCuj3b7Csk65AUwentPFMwO2XOOIIKjM
vLMtIC7NH3NoZW5nQGE2NC53b3JrIDxzaGVuZ0BhNjQud29yaz7CdwQQFgoAHwUC
XRdFDAYLCQcIAwIEFQgKAgMWAgECGQECGwMCHgEACgkQNxNU9MBgMD808gEAuMmw
rv9aYUtRFdiciexrS5Qn3vbEHFP79OLxRFRF67gBAIKjSVFzjIthakWgVCm2FqXM
uB6CHtauM+efGs0IKu4PzjgEXRdFDBIKKwYBBAGXVQEFAQEHQAlbJ4QovWaCke4w
/u+Ifr62gqUq7oRonoprkQCLN4ozAwEIB8JhBBgWCAAJBQJdF0UMAhsMAAoJEDcT
VPTAYDA/MJkA/090rl+f22pwlfyga4Z57ucITCHR2/Sz1CfFsCFx6N7bAQCCljjK
bwbogb9pzHWMaTDtYv4lQi1c5zLrNMpjpgZgDQ==
=6zvY
-----END PGP PUBLIC KEY BLOCK-----
signature.asc (application/pgp-signature, 249 B)
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail

wnUEARYIACcFAmPHlYEJkDcTVPTAYDA/FiEE4LPhP5ITia3pDv2ONxNU9MBg
MD8AAAdOAP96QKcJ5VSVrHjYYdaGVMhGxVQ1WA2zORIx9mgIVWCzOAD+NQrx
vcgN1ajZM1N4T7LJjMbMykvf2yxkhjXJEr84xgE=
=2xpi
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.