[rygel-grilo] Do not invoke Grilo if there are no keys
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel-grilo] Do not invoke Grilo if there are no keys
- Date: Thu, 15 Apr 2010 14:44:52 +0000 (UTC)
commit 3bc7a3c74830f6b0e0274b57bc63bc272b784dd8
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Thu Apr 15 16:15:42 2010 +0200
Do not invoke Grilo if there are no keys
As 'parent' key is not handled by Grilo, if user is asking only for that key,
do no send a request to Grilo; just resolve the key and return the result.
src/rygel-grilo.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/rygel-grilo.c b/src/rygel-grilo.c
index 49c5724..fe86865 100644
--- a/src/rygel-grilo.c
+++ b/src/rygel-grilo.c
@@ -388,12 +388,16 @@ get_properties_cb (const gchar *id,
rgdata->parent_id = get_parent_id (id);
media = unserialize_media (GRL_METADATA_SOURCE (rgdata->source), id);
- grl_media_source_metadata (rgdata->source,
- media,
- rgdata->keys,
- GRL_RESOLVE_FULL | GRL_RESOLVE_IDLE_RELAY,
- metadata_cb,
- rgdata);
+ if (rgdata->keys) {
+ grl_media_source_metadata (rgdata->source,
+ media,
+ rgdata->keys,
+ GRL_RESOLVE_FULL | GRL_RESOLVE_IDLE_RELAY,
+ metadata_cb,
+ rgdata);
+ } else {
+ metadata_cb (rgdata->source, media, rgdata, NULL);
+ }
wait_for_result (rgdata);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]