[gnome-documents/wip/facebook] Avoid a "(null)" string as title



commit 9c6a6ec5b1a36fc35024c86fc8f40f0e9d0e66ed
Author: Álvaro Peña <alvaropg gmail com>
Date:   Fri Jun 14 18:00:46 2013 +0200

    Avoid a "(null)" string as title

 src/miner/gd-facebook-miner.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/miner/gd-facebook-miner.c b/src/miner/gd-facebook-miner.c
index 4db90c1..5846bea 100644
--- a/src/miner/gd-facebook-miner.c
+++ b/src/miner/gd-facebook-miner.c
@@ -322,6 +322,10 @@ account_miner_job_process_photo (GdAccountMinerJob *job, GFBGraphPhoto *photo, c
   if (*error != NULL)
     goto out;
 
+  /* insert the photo title, sometimes, there is not a photo name, so we use the ugly photo id */
+  if (photo_name == NULL) {
+    photo_name = g_strdup (photo_id);
+  }
   gd_miner_tracker_sparql_connection_insert_or_replace_triple (job->connection,
                                                                job->cancellable, error,
                                                                job->datasource_urn, resource,


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