[tracker-miners/wip/carlosg/more-metadata] tracker-miner-fs: Include nfo:fileName in graph-specific info




commit aef2f017e1620c19750cf5f17354c5da26f24037
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Mar 12 11:24:35 2021 +0100

    tracker-miner-fs: Include nfo:fileName in graph-specific info
    
    We already mirror the nfo:FileDataObject into the metadata graphs,
    include additional properties that may be handy to consumers of the
    data. Rather than having them figure them out themselves.
    
    Related: https://gitlab.gnome.org/GNOME/tracker/-/issues/221

 src/miners/fs/tracker-miner-files.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index 820b741f2..323990d56 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -2153,6 +2153,9 @@ miner_files_process_file (TrackerMinerFS      *fs,
                graph_file = tracker_resource_new (uri);
                tracker_resource_add_uri (graph_file, "rdf:type", "nfo:FileDataObject");
 
+               tracker_resource_set_string (graph_file, "nfo:fileName",
+                                            g_file_info_get_display_name (file_info));
+
                time_str = g_date_time_format_iso8601 (modified);
                tracker_resource_set_string (graph_file, "nfo:fileLastModified", time_str);
                g_free (time_str);


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