Commit be263953 authored by Marinus Schraal's avatar Marinus Schraal Committed by Victor Toso
Browse files

tracker3: Add PUBLICATION_DATE for contentCreated

PUBLICATION_DATE is more in line with what the contentCreated property
is intended for in most media. Preserve CREATION_DATE for backward
compatability.
parent 8b2fac69
Pipeline #209859 passed with stage
in 14 minutes and 22 seconds
......@@ -511,6 +511,7 @@ grl_tracker_source_writable_keys (GrlSource *source)
GRL_METADATA_KEY_MB_RECORDING_ID,
GRL_METADATA_KEY_MB_TRACK_ID,
GRL_METADATA_KEY_MB_ARTIST_ID,
GRL_METADATA_KEY_PUBLICATION_DATE,
grl_metadata_key_chromaprint,
GRL_METADATA_KEY_INVALID);
}
......
......@@ -70,7 +70,8 @@ set_date (TrackerSparqlCursor *cursor,
const gchar *str = tracker_sparql_cursor_get_string (cursor, column, NULL);
if (key == GRL_METADATA_KEY_CREATION_DATE
|| key == GRL_METADATA_KEY_LAST_PLAYED
|| key == GRL_METADATA_KEY_MODIFICATION_DATE) {
|| key == GRL_METADATA_KEY_MODIFICATION_DATE
|| key == GRL_METADATA_KEY_PUBLICATION_DATE) {
GDateTime *date = grl_date_time_from_iso8601 (str);
if (date) {
grl_data_set_boxed (GRL_DATA (media), key, date);
......@@ -354,6 +355,12 @@ grl_tracker_setup_key_mappings (void)
GRL_TYPE_FILTER_ALL,
set_date);
insert_key_mapping_with_setter (GRL_METADATA_KEY_PUBLICATION_DATE,
"creationDate",
"nie:contentCreated(?urn)",
GRL_TYPE_FILTER_ALL,
set_date);
insert_key_mapping (GRL_METADATA_KEY_CAMERA_MODEL,
"cameraModel",
"nfo:model(nfo:equipment(?urn))",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment