[gnome-photos/wip/uajain/de_dup] Don't include urns that have set their ::relatedTo property
- From: Umang Jain <uajain src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/uajain/de_dup] Don't include urns that have set their ::relatedTo property
- Date: Sat, 6 Aug 2016 14:48:51 +0000 (UTC)
commit 5bf49dd07bc6e6504ad961e79726570faa05a0a2
Author: Umang Jain <mailumangjain gmail com>
Date: Sat Aug 6 19:56:52 2016 +0530
Don't include urns that have set their ::relatedTo property
Quick hack
src/photos-google-share-point.c | 7 ++++++-
src/photos-search-type-manager.c | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-google-share-point.c b/src/photos-google-share-point.c
index 4c3b58d..6823507 100644
--- a/src/photos-google-share-point.c
+++ b/src/photos-google-share-point.c
@@ -174,7 +174,12 @@ photos_google_share_point_create_tracker_entry (GDataPicasaWebFile *uploaded_fil
base_item_urn = photos_filterable_get_id (PHOTOS_FILTERABLE (item));
printf("I have got base-item urn: %s\n", base_item_urn);
- sparql = g_strdup_printf ("INSERT OR REPLACE { <%s> nie:relatedTo '%s' }", base_item_urn, urn);
+ /* We do, remote urn relatedTo base urn mapping here.
+ * In the model, we see if any urn has set its related to property then,
+ * it is definitely a remote urn and it does not show up in overview.
+ */
+
+ sparql = g_strdup_printf ("INSERT OR REPLACE { <%s> nie:relatedTo '%s' }", urn, base_item_urn);
printf("Query: %s\n", sparql);
if (connection)
diff --git a/src/photos-search-type-manager.c b/src/photos-search-type-manager.c
index 73cd8d8..e4f6f79 100644
--- a/src/photos-search-type-manager.c
+++ b/src/photos-search-type-manager.c
@@ -99,7 +99,8 @@ photos_search_type_manager_init (PhotosSearchTypeManager *self)
gchar *col_filter;
gchar *gif_filter;
- gif_filter = g_strdup ("nie:mimeType(?urn) != 'image/gif'");
+ // QUICK HACK to stop all urns that has set ::relatedTo
+ gif_filter = g_strdup ("nie:mimeType(?urn) != 'image/gif' && ! BOUND (nie:relatedTo(?urn))");
item_filter = g_strdup_printf ("(fn:contains (?type, 'nmm#Photo') && %s)", gif_filter);
col_filter = g_strdup_printf ("(fn:contains (?type, 'nfo#DataContainer')"
" && ?count > 0"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]