GSoC Week 2: Experimenting with Collections

Another week is already gone, and although it didn't see much progress feature wise, I've been working a lot on the project. Three days were spent on a nasty little hard to produce bug, one that would only occur 4 levels deep into the Content Directory, and not always in that case either. Finally with a lot of debug statements, many hours talking to Tuomo Penttinen of HUpnp we fixed a little bug in his library.

The reason the bug was present - MediaTomb was disconnecting my slave for connecting multiple times very very quickly. When it rejected the request, two slots were fired in the HUpnp code which caused multiple access's to certain data which should be modified only once... I'll spare the details.

Once that was fixed, I spent half a day getting the DLNA recommended meta-data being reported by the slave using custom UDSEntry fields. That was pretty easy.

That pretty much finishes the slave's Browse() API, since fetching file's is delegated to the HTTP slave. The next step is Search().

But I took a little break and started experimenting with Amarok's Collection code, which is HUMONGOUS and complicated. I still haven't figured it out completely. Like why Collection::queryMaker() has too return a new instance of a QueryMaker sub class everytime, or how the Capabilities system works, but I'll get there in the end. The result for today is manually inserting a track into the collection. Ah, I do like seeing progress: