[grilo-plugins/wip/carlosg/tracker3: 34/48] tracker3: Associate the SPARQL variable name to the grilo key




commit 3ef59cec83c2980bf33f7f70c5e72d89c35b9927
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun May 24 16:37:25 2020 +0200

    tracker3: Associate the SPARQL variable name to the grilo key
    
    We now look up variable names here, so update this. Also drop the
    other (no longer necessary) mappings.

 src/tracker3/grl-tracker-utils.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)
---
diff --git a/src/tracker3/grl-tracker-utils.c b/src/tracker3/grl-tracker-utils.c
index 4550a210..e8a6bfcd 100644
--- a/src/tracker3/grl-tracker-utils.c
+++ b/src/tracker3/grl-tracker-utils.c
@@ -173,21 +173,8 @@ insert_key_mapping (GrlKeyID       grl_key,
                        GRLKEYID_TO_POINTER (grl_key),
                        assoc_list);
   g_hash_table_insert (sparql_to_grl_mapping,
-                       (gpointer) assoc->sparql_key_name,
+                       (gpointer) assoc->sparql_var_name,
                        assoc);
-  g_hash_table_insert (sparql_to_grl_mapping,
-                       (gpointer) GRL_METADATA_KEY_GET_NAME (grl_key),
-                       assoc);
-
-  /* Grilo maps key names to SPARQL variables. Key names can contain dashes,
-   * however SPARQL does not allow dashes in variable names. So use the to
-   * underscores converted canon_name as additional mapping.
-   */
-  if (g_strrstr (assoc->sparql_key_name_canon, "_")) {
-    g_hash_table_insert (sparql_to_grl_mapping,
-                         (gpointer) assoc->sparql_key_name_canon,
-                         assoc);
-  }
 
   g_free (canon_name);
 


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