After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 719729 - Don't update a Facebook photo if the updated_date hasn't changed
Don't update a Facebook photo if the updated_date hasn't changed
Status: RESOLVED FIXED
Product: gnome-online-miners
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Álvaro Peña
GNOME Online Miners maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-12-02 22:48 UTC by Álvaro Peña
Modified: 2013-12-19 15:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Updated the GFBGraph depedency to 0.2.2 and used the updated_time property of a photo (2.79 KB, patch)
2013-12-02 23:58 UTC, Álvaro Peña
reviewed Details | Review
facebook: Update the DB only for new and modified entries (2.82 KB, patch)
2013-12-19 12:43 UTC, Debarshi Ray
committed Details | Review

Description Álvaro Peña 2013-12-02 22:48:33 UTC
Before to update all the properties of a Facebook photo, check if the updated date given by the Facebook Graph API is newer than the stored in Tracker.
Comment 1 Álvaro Peña 2013-12-02 23:58:08 UTC
Created attachment 263353 [details] [review]
Updated the GFBGraph depedency to 0.2.2 and used the updated_time property of a photo
Comment 2 Debarshi Ray 2013-12-10 14:19:20 UTC
Review of attachment 263353 [details] [review]:

Great. Thanks for the work.

Looks good, but when will 0.2.2 be released. The deadline for GNOME 3.11.3 is 16 December, so I do not want to merge this patch unless we have a new libgfbgraph release available.
Comment 3 Álvaro Peña 2013-12-16 21:24:42 UTC
GFBGraph 0.2.2 was released the past week, sorry for don't announce it in the bug. I guess there is no problem of apply the patch for the next release, right?
Comment 4 Debarshi Ray 2013-12-19 12:41:49 UTC
Review of attachment 263353 [details] [review]:

Thanks for the new GFBGraph release. Worked quite well here.

Some very minor style issues.

::: src/gom-facebook-miner.c
@@ +56,3 @@
   photo_link = gfbgraph_node_get_link (GFBGRAPH_NODE (photo));
   photo_created_time = gfbgraph_node_get_created_time (GFBGRAPH_NODE (photo));
+  photo_updated_time = gfbgraph_node_get_updated_time (GFBGRAPH_NODE (photo));

Better to do this later, when we actually need it.

@@ +85,2 @@
    * been modified since our last run
    */

For the sake of consistency, lets use the same comment that is used in the other miners.

@@ +85,3 @@
    * been modified since our last run
    */
+  if (g_time_val_from_iso8601 (photo_updated_time, &updated_tv) == FALSE)

Use the logical negation operator instead of comparing with FALSE for boolean return types.
Comment 5 Debarshi Ray 2013-12-19 12:42:53 UTC
Review of attachment 263353 [details] [review]:

You are missing the bugzilla URL in the commit message, and it should not be wider than 72 characters.
Comment 6 Debarshi Ray 2013-12-19 12:43:39 UTC
Created attachment 264543 [details] [review]
facebook: Update the DB only for new and modified entries

Fixes the above issues.
Comment 7 Álvaro Peña 2013-12-19 15:11:03 UTC
Thanks rishi!