[grilo-plugins/wip/carlosg/tracker-last-modification-date] tracker3: Coalesce nie:contentLastModified and nfo:fileLastModified
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins/wip/carlosg/tracker-last-modification-date] tracker3: Coalesce nie:contentLastModified and nfo:fileLastModified
- Date: Thu, 27 Aug 2020 10:42:34 +0000 (UTC)
commit e41c444073fc24f1deb073d80e9513e7448388bf
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Aug 27 12:40:08 2020 +0200
tracker3: Coalesce nie:contentLastModified and nfo:fileLastModified
The former refers to the last modification date as coming from the file
metadata, the latter comes from struct stat's mtime. Coalesce both when
querying, with a preference for the metadata source.
Fixes: https://gitlab.gnome.org/GNOME/grilo-plugins/-/issues/74
src/tracker3/grl-tracker-utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/tracker3/grl-tracker-utils.c b/src/tracker3/grl-tracker-utils.c
index 9680da9c..13f313f9 100644
--- a/src/tracker3/grl-tracker-utils.c
+++ b/src/tracker3/grl-tracker-utils.c
@@ -255,7 +255,7 @@ grl_tracker_setup_key_mappings (void)
insert_key_mapping_with_setter (GRL_METADATA_KEY_MODIFICATION_DATE,
"lastModified",
- "nie:contentLastModified(?urn)",
+ "COALESCE(nie:contentLastModified(?urn), (select ?lm { ?urn
nie:isStoredAs/nfo:fileLastModified ?lm }))",
GRL_TYPE_FILTER_ALL,
set_date);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]