This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Amarok2 DBus query Collection

Tags: None
(comma "," separated)
shoxrocks
Registered Member
Posts
1
Karma
0

Amarok2 DBus query Collection

Wed Feb 11, 2009 6:23 pm
Hey there,

I'm new to Amarok2 development and am trying to adjust a couple of scripts that have been utilizing Amarok1 so far. While I definitely plan to learn QtScript for internal scripts, there are some that query amarok externally, e.g. a recording software. To check if I am recording duplicates, I was  querying the Amarok collection via the DCOP interface. I haven't found any possible solution yet to do this via DBus, as the MPRIS API does not seem to support this and I haven't found anything else during my research. Is there a way to achieve this or do I have to use the Amarok DB directly (and I am happy about any hint how..).

Thanks for you help
User avatar
Alanceil
Registered Member
Posts
160
Karma
0
OS

Re: Amarok2 DBus query Collection

Mon Feb 16, 2009 1:48 pm
Have a look at qdbus, this command comes with qt4 and behaves similarly to the dcop command.
For example, qdbus org.kde.amarok /TrackList will list track information calls. (You would then use 'qdbus org.kde.amarok /TrackList GetMetadata 2' to get metadata for track 3 in your tracklist)
User avatar
Ramblurr
Registered Member
Posts
28
Karma
0
OS

Re: Amarok2 DBus query Collection

Wed Feb 18, 2009 9:12 am
Currently you cannot query the collection database via dbus, however you can query it in scripts.

I suggest opening a wish request at http://bugs.kde.org requesting collection querying via dbus.


Amarok Developer
User avatar
Ramblurr
Registered Member
Posts
28
Karma
0
OS

Re: Amarok2 DBus query Collection  Topic is solved

Sun Feb 22, 2009 10:23 am
SVN commit 929814 by mkossick:

added a D-Bus interface to query Amarok's collections.
It allows the same queries as in the collection browser. No services from the internet browser can be queried yet.
The queries have to be passed to Amarok as XML. The XML format isn't documented anywhere yet except in the code, but it's the same that Amarok uses to store dynamic playlists on disk.

Caveat: i'm not sure if the queryResult signal is actually emitted yet. at least nothing is shown by qdbusviewer. can somebody please whip up a small script to test it?


Amarok Developer
mmoe316
Registered Member
Posts
1
Karma
0

Re: Amarok2 DBus query Collection

Sun May 17, 2009 7:27 pm
I am wanting to get the collection support that 1.4 had with dcop from dbus for use with conky. Where is the documentation on requesting collection information through dbus.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]