[grilo-plugins/wip/carlosg/tracker3: 26/39] tracker3: Account for DataObject/InformationElement data split
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins/wip/carlosg/tracker3: 26/39] tracker3: Account for DataObject/InformationElement data split
- Date: Sun, 14 Jun 2020 18:38:44 +0000 (UTC)
commit 25bcdb8d220cadab9d1c6ccc4a78dc4a9cf9362d
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun May 24 13:21:19 2020 +0200
tracker3: Account for DataObject/InformationElement data split
In tracker3 these 2 classes are no longer attributed to the very same
resource object. Those are 2 different entities, so this must be
accounted for. Prefer to stay wherever possible in the InformationElement
domain, and resolve properly the DataObject from the InformationElement
otherwise.
src/tracker3/grl-tracker-utils.c | 26 +++++++++-----------------
1 file changed, 9 insertions(+), 17 deletions(-)
---
diff --git a/src/tracker3/grl-tracker-utils.c b/src/tracker3/grl-tracker-utils.c
index 6bd86063..b78dab53 100644
--- a/src/tracker3/grl-tracker-utils.c
+++ b/src/tracker3/grl-tracker-utils.c
@@ -314,21 +314,21 @@ grl_tracker_setup_key_mappings (void)
insert_key_mapping (GRL_METADATA_KEY_SIZE,
"size",
NULL,
- "nfo:fileSize(?urn)",
+ "nie:byteSize(?urn)",
"file",
GRL_TYPE_FILTER_ALL);
insert_key_mapping (grl_metadata_key_gibest_hash,
"gibestHash",
NULL,
- "(select nfo:hashValue(?h) { ?urn nfo:hasHash ?h . ?h nfo:hashAlgorithm \"gibest\" })",
+ "(select nfo:hashValue(?h) { ?urn nie:isStoredAs/nfo:hasHash ?h . ?h nfo:hashAlgorithm
\"gibest\" })",
"video",
GRL_TYPE_FILTER_VIDEO);
insert_key_mapping_with_setter (GRL_METADATA_KEY_MODIFICATION_DATE,
"lastModified",
- "nfo:fileLastModified",
- "nfo:fileLastModified(?urn)",
+ "nie:contentLastModified",
+ "nie:contentLastModified(?urn)",
"file",
GRL_TYPE_FILTER_ALL,
set_date);
@@ -379,7 +379,7 @@ grl_tracker_setup_key_mappings (void)
insert_key_mapping_with_setter (grl_metadata_key_chromaprint,
"chromaprint",
NULL,
- "(select nfo:hashValue(?h) { ?urn nfo:hasHash ?h . ?h nfo:hashAlgorithm
\"chromaprint\" })",
+ "(select nfo:hashValue(?h) { ?urn nie:isStoredAs/nfo:hasHash ?h . ?h
nfo:hashAlgorithm \"chromaprint\" })",
"audio",
GRL_TYPE_FILTER_AUDIO,
set_string_metadata_keys);
@@ -406,14 +406,6 @@ grl_tracker_setup_key_mappings (void)
"file",
GRL_TYPE_FILTER_ALL);
- insert_key_mapping_with_setter (GRL_METADATA_KEY_LAST_PLAYED,
- "fileLastAccessed",
- "nfo:fileLastAccessed",
- "nfo:fileLastAccessed(?urn)",
- "file",
- GRL_TYPE_FILTER_ALL,
- set_date);
-
insert_key_mapping (GRL_METADATA_KEY_MIME,
"mimeType",
"nie:mimeType",
@@ -423,8 +415,8 @@ grl_tracker_setup_key_mappings (void)
insert_key_mapping (GRL_METADATA_KEY_SITE,
"siteUrl",
- "nie:url",
- "nie:url(?urn)",
+ "nie:isStoredAs",
+ "nie:isStoredAs(?urn)",
"file",
GRL_TYPE_FILTER_ALL);
@@ -446,8 +438,8 @@ grl_tracker_setup_key_mappings (void)
insert_key_mapping (GRL_METADATA_KEY_URL,
"url",
- "nie:url",
- "nie:url(?urn)",
+ "nie:isStoredAs",
+ "nie:isStoredAs(?urn)",
"file",
GRL_TYPE_FILTER_ALL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]