[tracker-miners/wip/carlosg/graphs: 12/18] tracker-extract: Store the graph as specified in the extract rule



commit 8398634e162382d951d2bff9ea5aa7d24130ffa5
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Apr 26 14:06:32 2020 +0200

    tracker-extract: Store the graph as specified in the extract rule
    
    Make everything ready to use it in SPARQL production.

 src/tracker-extract/tracker-extract.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/tracker-extract/tracker-extract.c b/src/tracker-extract/tracker-extract.c
index d9df81172..b476913cc 100644
--- a/src/tracker-extract/tracker-extract.c
+++ b/src/tracker-extract/tracker-extract.c
@@ -83,6 +83,7 @@ typedef struct {
        GAsyncResult *res;
        gchar *file;
        gchar *mimetype;
+       const gchar *graph;
 
        TrackerExtractMetadataFunc func;
        GModule *module;
@@ -272,7 +273,7 @@ get_file_metadata (TrackerExtractTask  *task,
        *info_out = NULL;
 
        file = g_file_new_for_uri (task->file);
-       info = tracker_extract_info_new (file, task->mimetype, NULL);
+       info = tracker_extract_info_new (file, task->mimetype, task->graph);
        g_object_unref (file);
 
        if (task->mimetype && *task->mimetype) {
@@ -551,6 +552,8 @@ dispatch_task_cb (TrackerExtractTask *task)
                return FALSE;
        }
 
+       task->graph = tracker_extract_module_manager_get_graph (task->mimetype);
+
        async_queue = g_hash_table_lookup (priv->single_thread_extractors,
                                           task->module);
 


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