On Tue, 2014-01-21 at 11:23 +0100, Bastien Nocera wrote:
> Although, that won't work with added though, as either you'll pass the
> GrlMediaBox that contained the added item (meaning, "you need to browse
> this again") or pass the new GrlMedia which is fine if you know that you
> don't have any children items in the source but is useless otherwise.
> 
> Should I file a bug about this? I'd fix this by adding a new
> grl_source_notify_change()-like call, deprecate the old one, and still
> send out the compat "content-changed" signal.
> 

Not sure if I'm understanding completely. Could you elaborate it more?

One of the problems in "added" with sending the GrlMedia is that
application doesn't know if the element is of interest for the
application or not. And that's because application is showing content
from a search or from a container, and the it doesn't know if the new
added element is for that container (so it should show it) or is from a
different container irrelevant at that moment. Dunno if this is related
with above.

One solution could be sending also the container where the element
belongs. So application knows if the element is of interest or not. And
on top of this, for those very lazy applications, they could choose to
just re-launch a browse of the container instead of adding the added
element.


> > I think if you want to do lookups only using one source, you would need
> > to do it by hand, calling resolve().
> 
> grl_source_resolve() needs to be called by hand in all cases, doesn't


Yes, grl_source_resolve() needs to be called, unless you want to allow
to do it in the browse itself.

My point is that if you want to call only local-metadata, you need to
invoke resolve() over local-metadata. But if you want to use all the
plugins, you could use directly the same source you used to browse, and
let Grilo to choose which plugins should invoke to satisfy the
requirement. You could set up priorities in the sources so, for
instance, local-metadata is used before TMDBb.

> it? Maybe an explanation of what GrlSource needs to be passed to
> grl_source_notify_change() would be useful.
>

I don't fully understand what you mean: the source passed in the
notify-change is the source that creates the content. Sources
complementing information (like TMDb or local-metadata) doesn't send
notifications.


        J.A.


_______________________________________________
grilo-list mailing list
grilo-list@gnome.org
https://mail.gnome.org/mailman/listinfo/grilo-list

Reply via email to