[grilo-plugins] tracker: Support GRL_METADATA_KEY_START_TIME
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] tracker: Support GRL_METADATA_KEY_START_TIME
- Date: Tue, 3 Apr 2012 15:56:42 +0000 (UTC)
commit 05d14b13fa3deb1e02da77fb4bd6b871dedd6907
Author: Sam Thursfield <sam thursfield codethink co uk>
Date: Tue Oct 25 18:44:47 2011 +0100
tracker: Support GRL_METADATA_KEY_START_TIME
Indicates the offset of a logical resource inside the file that
contains it.
Support situations where multiple logical resources are contained
in one physical file. This allows us to support multiple audio files
contained in one .FLAC file and indexed with a cue sheet, for example.
https://bugzilla.gnome.org/show_bug.cgi?id=662748
src/media/tracker/grl-tracker-media-api.c | 6 ++++--
src/media/tracker/grl-tracker-utils.c | 11 ++++++++---
2 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/src/media/tracker/grl-tracker-media-api.c b/src/media/tracker/grl-tracker-media-api.c
index def011d..8211903 100644
--- a/src/media/tracker/grl-tracker-media-api.c
+++ b/src/media/tracker/grl-tracker-media-api.c
@@ -96,7 +96,8 @@ GRL_LOG_DOMAIN_STATIC(tracker_media_result_log_domain);
"WHERE " \
"{ " \
"?urn a %s . " \
- "?urn tracker:available ?tr . " \
+ "?urn nie:isStoredAs ?file . " \
+ "?file tracker:available ?tr . " \
"%s " \
"} " \
"ORDER BY DESC(nfo:fileLastModified(?urn)) " \
@@ -139,7 +140,8 @@ GRL_LOG_DOMAIN_STATIC(tracker_media_result_log_domain);
"SELECT %s " \
"WHERE " \
"{ " \
- "?urn a nie:DataObject . " \
+ "?urn a nie:InformationElement ; " \
+ " nie:isStoredAs ?file . " \
"FILTER (tracker:id(?urn) = %s) " \
"}"
diff --git a/src/media/tracker/grl-tracker-utils.c b/src/media/tracker/grl-tracker-utils.c
index 7132d65..c8daaea 100644
--- a/src/media/tracker/grl-tracker-utils.c
+++ b/src/media/tracker/grl-tracker-utils.c
@@ -234,7 +234,7 @@ grl_tracker_setup_key_mappings (void)
insert_key_mapping (GRL_METADATA_KEY_SITE,
"nie:url",
- "nie:url(?urn)",
+ "nie:url(?file)",
"file");
insert_key_mapping (GRL_METADATA_KEY_TITLE,
@@ -244,12 +244,12 @@ grl_tracker_setup_key_mappings (void)
insert_key_mapping (GRL_METADATA_KEY_TITLE,
"nfo:fileName",
- "nfo:fileName(?urn)",
+ "nfo:fileName(?file)",
"file");
insert_key_mapping (GRL_METADATA_KEY_URL,
"nie:url",
- "nie:url(?urn)",
+ "nie:url(?file)",
"file");
insert_key_mapping (GRL_METADATA_KEY_WIDTH,
@@ -314,6 +314,11 @@ grl_tracker_setup_key_mappings (void)
"nfo:lastPlayedPosition(?urn)",
"media");
+ insert_key_mapping (GRL_METADATA_KEY_START_TIME,
+ "nfo:audioOffset",
+ "nfo:audioOffset(?urn)",
+ "media");
+
if (grl_tracker_upnp_present) {
insert_key_mapping (GRL_METADATA_KEY_THUMBNAIL,
"upnp:thumbnail",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]