SearchWiki
Recent Changes
Edit Page
Page History

Messages from the client to the daemon are prefixed with '> ' and vice versa.

In the following, n refers to a number, and b to a boolean, i.e. 0 or 1. path is self-explanatory

Preamble
> Version
< Version 2.1
> IMMS
> Setup b
> PlaylistChanged n
< GetEntirePlaylist
> Playlist 0 path
> Playlist 1 path
...
> Playlist n path
> PlaylistEnd

The Setup parameter is whether to use X idle statistics. The PlaylistChanged parameter is the length of the playlist.

At this point the server will quiz the client with random queries:

< GetPlaylistItem n
> PlaylistItem n path
...

If, now or later, immsd believes it is out of sync with the playlist,
< PlaylistChanged
> PlaylistChanged n
which triggers a GetEntirePlaylist exchange. Consider this a rebuke—you really should send PlaylistChanged n whenever the playlist changes.

When a new song begins to play, the client sends:
> StartSong n path

When the client is ready to queue up the next song from IMMS:
> SelectNext
< EnqueueNext n
Occasionally the answer will instead be TryAgain, which is self explanatory.

When a song is finished, skipped, or jumped away from:
> EndSong b b b

where the parameters are finished (not skipped), jumping, and bad (if bad is true, no ratings adjustments are made). Watch the log in ~/.imms/imms.log to get the hang of it.

From time to time, the server will send:
< ResetSelection

in which case the client should send SelectNext and replace the upcoming IMMS tune with the resulting EnqueueNext command. This is so IMMS can change its mind about what the best next song would be.


The protocol is straightforward and can be implemented as an event loop listening to commands on the server, and a control thread notifying IMMS of the changes in the media player.

Server-originated messages:

Client-originated messages:

Consult the source in immsd/ and clients/ with any unanswered questions, then update this page with the answers.


Edit Page - Page History - Printable View - Recent Changes - WikiHelp - SearchWiki
Page last modified on October 01, 2008, at 05:27 PM