[gnome-documents/wip/flickr: 8/12] wip/flickr: Some aestetical changes



commit ef0eaf2edd209a234620ebcaba5707980c83431d
Author: Marek Chalupa <mchalupa redhat com>
Date:   Fri May 17 11:13:57 2013 +0200

    wip/flickr: Some aestetical changes

 src/miner/gd-flickr-miner.c |   17 +++++++----------
 src/miner/gd-miner.c        |    4 +++-
 2 files changed, 10 insertions(+), 11 deletions(-)
---
diff --git a/src/miner/gd-flickr-miner.c b/src/miner/gd-flickr-miner.c
index bda83d8..42705d3 100644
--- a/src/miner/gd-flickr-miner.c
+++ b/src/miner/gd-flickr-miner.c
@@ -111,7 +111,6 @@ gd_flickr_miner_class_init (GdFlickrMinerClass *klass)
   GrlRegistry *registry;
   GError *error = NULL;
 
-  /* TODO get and assign provider type from plugin */
   miner_class->goa_provider_type = GOA_PROVIDER_TYPE;
   miner_class->miner_identifier = MINER_IDENTIFIER;
   miner_class->version = MINER_VERSION;
@@ -119,11 +118,7 @@ gd_flickr_miner_class_init (GdFlickrMinerClass *klass)
   miner_class->create_service = create_service;
   miner_class->query = query_flickr;
 
-  /* TODO unload plugins and so on */
-  //miner_class->finalize = gd_flickr_miner_class_finalaze;
-
   grl_init(NULL, NULL);
-
   registry = grl_registry_get_default();
 
   if (! grl_registry_load_plugin_by_id (registry, GRILO_TARGET_PLUGIN, &error))
@@ -232,23 +227,25 @@ account_miner_job_browse_container (struct entry *entry)
   g_return_if_fail (entry->parent == NULL || GRL_IS_MEDIA (entry->parent));
   g_return_if_fail (GRL_IS_SOURCE (entry->source));
 
-  g_debug ("Browsing container %s of %s (from %s)", entry->media ?grl_media_get_title (entry->media) : 
"root",
-                                          entry->parent ? grl_media_get_title (entry->parent) : "root",
+  g_debug ("Browsing container '%s' [parent: '%s', source '%s']", entry->media ?grl_media_get_title 
(entry->media) : "root",
+                                          entry->parent ? grl_media_get_title (entry->parent) : "none",
                                           grl_source_get_name (entry->source));
 
   /* Skip public source */
-  if (g_strcmp0 (grl_source_get_name (entry->source), "Flickr") == 0) {
+  if (g_strcmp0 (grl_source_get_name (entry->source), GRILO_PUBLIC_SOURCE_NAME) == 0) {
     g_debug ("Skipping public source");
     delete_entry (entry); 
     return;
   }
 
   GrlOperationOptions *ops;
+  GrlCaps *caps;
   const GList *keys;
 
   /* get possiblly all */
   keys = grl_source_supported_keys (entry->source);
-  ops = grl_operation_options_new (grl_source_get_caps (entry->source, GRL_OP_BROWSE));
+  caps = grl_source_get_caps (entry->source, GRL_OP_BROWSE);
+  ops = grl_operation_options_new (caps);
 
   /* FIXME make the browsing cancellable */
   grl_source_browse (entry->source, entry->media,
@@ -260,7 +257,7 @@ account_miner_job_browse_container (struct entry *entry)
 static gboolean
 account_miner_job_process_entry (struct entry *entry, GError **error)
 {
-  g_debug ("Got %s %s from source %s", GRL_IS_MEDIA_BOX (entry->media) ? "box" : "media",
+  g_debug ("Got %s '%s' from source '%s'", GRL_IS_MEDIA_BOX (entry->media) ? "box" : "media",
                                         grl_media_get_title (entry->media),
                                         grl_media_get_source (entry->media));
 
diff --git a/src/miner/gd-miner.c b/src/miner/gd-miner.c
index 9631145..5998062 100644
--- a/src/miner/gd-miner.c
+++ b/src/miner/gd-miner.c
@@ -638,6 +638,7 @@ static void
 gd_miner_refresh_db_real (GdMiner *self)
 {
   GoaDocuments *documents;
+  GoaPhotos *photos;
   GoaAccount *account;
   GoaObject *object;
   const gchar *provider_type;
@@ -663,7 +664,8 @@ gd_miner_refresh_db_real (GdMiner *self)
       acc_objects = g_list_append (acc_objects, g_object_ref (object));
 
       documents = goa_object_peek_documents (object);
-      if (documents == NULL)
+      photos = goa_object_peek_photos (object);
+      if (documents == NULL && photos == NULL)
         continue;
 
       doc_objects = g_list_append (doc_objects, g_object_ref (object));


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