maemoscrobbler DBUS API
There are two API calls. These should be called within media player software. Install syslogd and keep a tail -f on syslog while testing.
api call: "playing"
This method should be called for each played track. Can be called anytime within the track.
Tracks that are shorter than 30 seconds (duration<30) will be ignored.
Recommended time to call this method is just a few seconds after track starts playing.
Data passed on to the method is cached, and it is submitted when track is 50% or 240 seconds complete, whichever comes first.
You should call the "stopped" method if the user seeks within or skips the track.
call com.nokia.songlistend.playing with the following parameters. All strings should be in utf-8. Do not try to guess info from the filename - if there are no tags, don't submit the file.
string:artist name
string:track name
string:album name (optional, if unknown use empty string, "")
uint32:track duration (seconds) (int32 is also ok)
uint32:current position in track (seconds) (int32 is also ok)
example:
dbus-send --print-reply --type=method_call --dest=com.nokia.songlistend /com/nokia/songlistend com.nokia.songlistend.playing string:"artist name" string:"track name" string:"album name (optional)" uint32:<track duration> uint32:<current position>
api call: "stopped"
This method should be called whenever user seeks within the track or the track is stopped. Stop button, next track, prev track, program close all qualify for this.
Do not call this when the track is paused.
call com.nokia.songlistend.stopped, no parameters required.
example:
dbus-send --print-reply --type=method_call --dest=com.nokia.songlistend /com/nokia/songlistend com.nokia.songlistend.stopped
most of this doc is written in less than 10 minutes, please send in suggestions/patches. revision 1.