dbusjs / node-dbus-next

🚌 The next great dbus library for node
https://www.npmjs.com/package/dbus-next
155 stars 52 forks source link

Issue when trying to fetch mpris tracks metadata #85

Open namxam opened 2 years ago

namxam commented 2 years ago

I guess I am doing something wrong, but when I call tracklist.GetTracksMetadata(tracks) I receive the following error. I guess I have to prepare tracks differently, but I have no idea what is expected. From what I understand, ao should be an array of object paths. But providing it as a plain js array fails. So I fetched the Tracks property which should return the exact data structure which is required and provide it as the parameter. But this fails as well.

node_modules/dbus-next/lib/marshall-compat.js:123
        throw new Error(`expecting an array for signature '${signatureStr}' (got ${typeof value})`);
              ^
Error: expecting an array for signature 'ao' (got object)
    at jsToMarshalFmt (node_modules/dbus-next/lib/marshall-compat.js:123:15)
    at marshallMessage (node_modules/dbus-next/lib/marshall-compat.js:179:27)
    at EventEmitter.self.message (node_modules/dbus-next/lib/connection.js:141:20)
    at node_modules/dbus-next/lib/bus.js:349:24
    at new Promise (<anonymous>)
    at MessageBus.call (node_modules/dbus-next/lib/bus.js:326:12)
    at node_modules/dbus-next/lib/client/proxy-object.js:163:16
    at new Promise (<anonymous>)
    at ProxyObject._callMethod (node_modules/dbus-next/lib/client/proxy-object.js:151:12)
    at ProxyInterface.iface.<computed> [as GetTracksMetadata] (node_modules/dbus-next/lib/client/proxy-interface.js:218:37)
acrisci commented 2 years ago

What player are you using? Can you provide a minimum steps to reproduce the issue as a script?