Reply To: FireSpiff – Export XML playlist (XSPF)

#15068
EVILRipper
Participant

@blamm wrote:

How would I do that?

Quite simple.
You have seen this link: http://wiki.mt-daapd.org/wiki/XML_Client_API
Well, all those URL’s have a “?output=XML” at the end.
Take it off. 🙂 You will get some unreadable bunch of data.

The unofficial documentation I found: http://www.tapjam.net/daap/
This explains how it works.

Explained in short:
The whole output is in tags.
The first 4 bytes defines what it is going to send.
Example: msrv; This is the response to server-info
The next 4 bytes is the size of the content of msrv.
Next, is the content of the server-info, in x bytes, determined by the second 4 bytes.

This is by far the most efficient way firefly supports to send data, because all tags are a max of 8 bytes (4 for identifier, 4 for size).

This was the method used to receive info before firefly was developed, when it was still mt-daapd.
(Please correct me if I’m wrong)

Decoding this xdmap-tagged data is quite a challenge, but if you write some effective functions, it’s a piece of cake.

If you want to see it for yourself, try running the following url, and downloading the whole page into a file. Next open it with any Hex Editor. (I use Notepad++) It should contain the data format I just explained. All the other tags can be referred to from the unofficial documentation.

http://:3689/server-info

Happy coding. 🙂