[totem] grilo: Also look up saved metadata



commit 0c520361b93ecdb7f43517fe553be76d0358d15b
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Jan 26 14:05:49 2014 +0100

    grilo: Also look up saved metadata
    
    Using the metadata store. This would allow us to cache locally
    metadata from online sources such as tmdb.

 src/plugins/grilo/totem-grilo.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/grilo/totem-grilo.c b/src/plugins/grilo/totem-grilo.c
index 4dac225..f051f56 100644
--- a/src/plugins/grilo/totem-grilo.c
+++ b/src/plugins/grilo/totem-grilo.c
@@ -79,6 +79,7 @@ typedef struct {
        GtkWindow *main_window;
 
        GrlSource *local_metadata_src;
+       GrlSource *metadata_store_src;
 
        /* Current media selected in results*/
        GrlMedia *selected_media;
@@ -461,6 +462,11 @@ add_local_metadata (TotemGriloPlugin *self,
                                 self->priv->metadata_keys,
                                 options,
                                 NULL);
+       grl_source_resolve_sync (self->priv->metadata_store_src,
+                                media,
+                                self->priv->metadata_keys,
+                                options,
+                                NULL);
        g_object_unref (options);
 }
 
@@ -947,7 +953,6 @@ source_is_blacklisted (GrlSource *source)
                "grl-filesystem",
                "grl-shoutcast",
                "grl-flickr",
-               "grl-metadata-store",
                "grl-podcasts",
                NULL
        };
@@ -1135,6 +1140,8 @@ source_added_cb (GrlRegistry *registry,
                name = grl_source_get_name (source);
        if (g_str_equal (id, "grl-local-metadata"))
                self->priv->local_metadata_src = source;
+       else if (g_str_equal (id, "grl-metadata-store"))
+               self->priv->metadata_store_src = source;
        ops = grl_source_supported_operations (source);
 
        if (ops & GRL_OP_BROWSE) {


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