Re: Problem With File Browsing through Grilo



On Thu, 2012-06-14 at 14:52 +0800, Rakesh Dhanya (RBEI/ECP2) wrote:
> Using grl_media_source_browse/grl_media_source_browse_async gives all
> the media files that are available in that container along with their
> metadata. But this needs the container ID. So we are back to the same
> problem again. What GrlMedia container needs to be specified to use
> grl_media_source_browse/grl_media_source_browse_async with tracker
> plugin? 


The browse() operation was conceived to provide a tree-like browsing,
starting from a root point. So it wasn't conceived to start from any
arbitrary point, because this point must be a GrlMediaBox, and you get
the boxes as a result of a previous browse() operation.

You know all your media resides in the same place, don't you? I guess
you have two options here: one is using the URI for that container and
use media_from_uri() functions to get a GrlMediaBox, which you can use
to browse() and get all the elements in that container.

The other option, if you are using the grl-filesystem to browse the
content, is setting your folder as the root path. This can be done
setting the "base-path" as the path to the folder, using GrlConfig.

In any case, maybe there are other alternatives. I don't know exactly
what are you trying to do, or why. Knowing it could allow me to provide
other options.

	J.A.

PS: I forgot to tell you in a previous mail. When looking up if the
source is Tracker/Filesystem source to perform a browse, do not compare
with the name, but with the ID. Name is like a 'title' to be
pretty-printed in the application, but it is not guaranteed that it is
unique, or that it can't change in future. But the ID is unique. So use
grl_metadata_source_get_id() instead of grl_metadata_source_get_name()





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]