[brasero/wip/carlosg/tracker3: 23/24] Observe nfo:FileDataObject/nie:InformationElement split




commit b41d69ac256c6098e6e9bae70491d9d1687b0ce6
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Dec 24 13:15:21 2020 +0100

    Observe nfo:FileDataObject/nie:InformationElement split
    
    These resources are interpreted differently in Tracker 3.0 compared
    to older versions, the newer version makes those 2 different resources
    (one representing the "file", other the "content) that relate to each
    other. In older tracker versions, these 2 aspects were conflated in
    a single resource.
    
    The query is implicitly crossing that barrier, so make it explicit.
    With this change, the query may run with either version.

 src/brasero-search-tracker.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/brasero-search-tracker.c b/src/brasero-search-tracker.c
index ae1d388a..9aa06289 100644
--- a/src/brasero-search-tracker.c
+++ b/src/brasero-search-tracker.c
@@ -238,7 +238,8 @@ brasero_search_tracker_query_start_real (BraseroSearchEngine *search,
                              "WHERE {"                                         /* Start defining the search 
and its scope */
                              "  ?file a nfo:FileDataObject . "                 /* File must be a file (not a 
stream, ...) */
                              "  ?file nie:url ?url . "                         /* Get the url of the file */
-                             "  ?file nie:mimeType ?mime . ");                 /* Get its mime */
+                             "  ?file nie:mimeType ?mime . "                   /* Get its mime */
+                             "  ?content nie:isStoredAs ?file . ");            /* Get the resource 
representing the content */
 
        if (priv->mimes) {
                int i;
@@ -259,7 +260,7 @@ brasero_search_tracker_query_start_real (BraseroSearchEngine *search,
                gboolean param_added = FALSE;
 
                g_string_append (query,
-                                "  ?file a ?type . "
+                                "  ?content a ?type . "
                                 "  FILTER ( ");
 
                if (priv->scope & BRASERO_SEARCH_SCOPE_MUSIC) {


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