Re: media_from_site API
- From: Iago Toral Quiroga <itoral igalia com>
- To: grilo-list gnome org
- Subject: Re: media_from_site API
- Date: Fri, 10 Dec 2010 11:58:05 +0100
El vie, 10-12-2010 a las 11:12 +0100, Juan A. Suarez Romero escribió:
> On Fri, 2010-12-10 at 10:33 +0100, Iago Toral Quiroga wrote:
> > The thing is that this "test" does not make sense for all the other
> > cases. In the case of the URI I can check that in the youtube plugin I
> > won't support URIs that don't belong to www.youtube.com for example,
> > and
> > then avoid any kind of network I/O, but if I know other keys like song
> > title or artist name, then that won't help me at all, I would have to
> > query the backend to know if they can match a specific song/video and
> > I
> > won't save any work.
> I didn't mean that actually plugins needs to implement that function.
> Rather, that they would need to use a similar idea.
> For instance, in the case of URI, youtube plugin would not resolve it if
> URI is not of www.youtube.com type. Each plugin that support URI
> reverse-resolve would handle other uris. No need to do network I/O,
> unless you're asking for more attributes that can't be get from the URI
The problem with that is that the work-flow would be like this:
=> If returns TRUE then I have to check the result in the callback
=> if returns FALSE then there is no callback involved
It is just less convenient because depending on the result of the
function you have to expect a callback to be invoked or not. Or we could
make it use the callback also for the FALSE case, but that would not be
convenient at all if you just want to look for the appropriate plugin
for a certain URI (just select the right plugin).
] [Thread Prev