2014-11-13 10:11 GMT+01:00 Juan A. Suarez Romero <jasua...@igalia.com>: > On Wed, 2014-11-12 at 22:15 +0100, Guilhem Bonnefille wrote: >> If someone can point me a good documentation on the role of the grilo >> resolve function... it will help me to decide if I have to provide >> such function in my plugin, or if I don't. >> > > resolve() function is used to provide information about metadata keys > that weren't asked before in a browse/search operation. > > For example, a client could request in a search operation about "title" > and "author". So source would be returning only that information. > > If later the client wants to show a new field, like "thumbnail", for a > specific media, it would use resolve() and ask for "thumbnail". > > Let's show a different but real example. You want to show in a grid the > results from searching all Videos in YouTube. Specifically, you want to > show a thumbnail and a title below. > > So you ask Grilo for both fields, plus URL for further playing. But, in > order to be as faster as possible, you use the GRL_RESOLVE_FAST_ONLY > flag, which makes the Grilo to drop those fields that could make the > query too much slow. > > In the case of YouTube, asking for URL makes the search/browse slow, so > Grilo will drop that key: the results you ask for only contain thumbnail > and title. No problem. You show the content, and user clicks on video to > play it. Well, you realize you don't have URL, so you use resolve() to > ask for URL in that case. > > > So in summary, if you don't provide resolve() it means the clients only > can get the required fields in the browse or search operations. They > can't ask later for the fields that weren't asked before. >
Thanks for these informations. I totally missed the GrlKeyId list. I have significant change to do on my plugin before proposing it for inclusion. Thanks again. -- Guilhem BONNEFILLE -=- JID: gu...@im.apinc.org MSN: guilhem_bonnefi...@hotmail.com -=- mailto:guilhem.bonnefi...@gmail.com -=- http://nathguil.free.fr/ _______________________________________________ grilo-list mailing list grilo-list@gnome.org https://mail.gnome.org/mailman/listinfo/grilo-list