Herostratus’ legacy

words from a lazy coder

grilo network library

Well, after almost a month of sketching out and playing with the grilo network library, finally I pushed it into the official repository.The story is this: almost all the grilo plugins fetch their media metadata from the Web. Their initial implementation used Gvfs, but this approach implied some issues: Gvfs is not well supported in non-Gnome environments, no cache handling and it doesn’t provide a throttling mechanism.

As we desire to be nice guys with the Web services providing the metadata, and also we want to play well with other players besides Gnome, so We though it could be a good idea provide an utility class for grilo plugins which can be used as a libsoup wrapper, which also would provide that functionality still doesn’t provided by libsoup yet (cache and throttling).

Nevertheless this web client functionality, semantically speaking, is not part of grilo, the plugins could depend on other HTTP client, so we set it up as a different library distributed by grilo’s core: grl-net. So whether your plugin want to used, you just have to link the library against it.

The web client uses the GAsync interface of GIO, so it is intuitive and easy to port to GI and Vala, which are already supported in upstream too (more tests are needed).

As a final note, the web client is not finished yet, the memory cache and the sync methods are work in progress, but it is already used by all the plugins provided by grilo.