[gnome-online-miners/wip/facebook] Use GFBGraph albums functions to get the name and the description.



commit d2b68d2b1bf6d403f8c3e17cbb7ea46505488adf
Author: Álvaro Peña <alvaropg gmail com>
Date:   Mon Aug 19 23:24:23 2013 +0200

    Use GFBGraph albums functions to get the name and the description.

 src/gom-facebook-miner.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/gom-facebook-miner.c b/src/gom-facebook-miner.c
index 1b6a5f0..25d9dff 100644
--- a/src/gom-facebook-miner.c
+++ b/src/gom-facebook-miner.c
@@ -133,8 +133,8 @@ static gboolean
 account_miner_job_lookup_album (GomAccountMinerJob *job, GFBGraphAlbum *album, const gchar *creator, GError 
**error)
 {
   const gchar *album_id;
-  gchar *album_name;
-  gchar *album_description;
+  const gchar *album_name;
+  const gchar *album_description;
   const gchar *album_link;
   const gchar *album_created_time;
   gchar *identifier;
@@ -148,10 +148,8 @@ account_miner_job_lookup_album (GomAccountMinerJob *job, GFBGraphAlbum *album, c
   album_id = gfbgraph_node_get_id (GFBGRAPH_NODE (album));
   album_link = gfbgraph_node_get_link (GFBGRAPH_NODE (album));
   album_created_time = gfbgraph_node_get_created_time (GFBGRAPH_NODE (album));
-  g_object_get (album,
-                "name", &album_name,
-                "description", &album_description,
-                NULL);
+  album_name = gfbgraph_album_get_name (album);
+  album_description = gfbgraph_album_get_description (album);
 
   identifier = g_strdup_printf ("photos:collection:facebook:%s", album_id);
 
@@ -240,8 +238,6 @@ account_miner_job_lookup_album (GomAccountMinerJob *job, GFBGraphAlbum *album, c
   }
 
  out:
-  g_free (album_name);
-  g_free (album_description);
   g_free (identifier);
   g_free (resource);
 


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