[grilo] core: Skip browsed source from resolvable sources



commit 6dfc79c20bf33f0df483452ae6a4bd0f757177e9
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Wed Jan 30 18:52:42 2013 +0100

    core: Skip browsed source from resolvable sources
    
    When a key cannot be solved in a browse/search operation, we ask other
    sources that implement resolve() and that can be solve that key to get
    its value (only when GRL_RESOLVE_FULL is true).
    
    But it can happen that the key is supported by the source in the
    browse/search operation, only that for the result it doesn't have a
    value. Thus, when looking for sources implementing resolve() for that
    key, we need to skip the browsed source, as we know it doesn't have a
    value for the key.

 src/grl-source.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/grl-source.c b/src/grl-source.c
index 0e94a34..f25c79c 100644
--- a/src/grl-source.c
+++ b/src/grl-source.c
@@ -1199,6 +1199,10 @@ get_additional_source_for_key (GrlSource *source,
     GList *_additional_keys = NULL;
     GrlSource *_source = (GrlSource *) iter->data;
 
+    if (_source == source) {
+      continue;
+    }
+
     if (grl_source_may_resolve (_source, media, key, &_additional_keys)) {
       return _source;
     }



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