[tracker] tracker-extract-gstreamer: Set nmm:albumArtist to nmm:MusicAlbum
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract-gstreamer: Set nmm:albumArtist to nmm:MusicAlbum
- Date: Thu, 13 May 2010 09:39:47 +0000 (UTC)
commit a2c479f5eb7192cbe166ff0233f4d93407daa2f3
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu May 13 11:37:40 2010 +0200
tracker-extract-gstreamer: Set nmm:albumArtist to nmm:MusicAlbum
src/tracker-extract/tracker-extract-gstreamer.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index fe69236..6c3af75 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -499,6 +499,7 @@ extract_metadata (MetadataExtractor *extractor,
g_return_if_fail (metadata != NULL);
if (extractor->tagcache) {
+ gchar *artist_uri = NULL;
gchar *performer_uri = NULL;
gchar *composer_uri = NULL;
gchar *album_uri = NULL;
@@ -527,6 +528,18 @@ extract_metadata (MetadataExtractor *extractor,
gst_tag_list_get_string (extractor->tagcache, GST_TAG_PERFORMER, &performer);
gst_tag_list_get_string (extractor->tagcache, GST_TAG_ARTIST, &artist_local);
+ if (artist_local) {
+ artist_uri = tracker_uri_printf_escaped ("urn:artist:%s", artist_local);
+
+ tracker_sparql_builder_insert_open (preupdate, NULL);
+ tracker_sparql_builder_subject_iri (preupdate, artist_uri);
+ tracker_sparql_builder_predicate (preupdate, "a");
+ tracker_sparql_builder_object (preupdate, "nmm:Artist");
+ tracker_sparql_builder_predicate (preupdate, "nmm:artistName");
+ tracker_sparql_builder_object_unvalidated (preupdate, artist_local);
+ tracker_sparql_builder_insert_close (preupdate);
+ }
+
temp = tracker_coalesce_strip (2, performer, artist_local);
if (temp) {
@@ -588,6 +601,11 @@ extract_metadata (MetadataExtractor *extractor,
tracker_sparql_builder_predicate (preupdate, "nmm:albumTitle");
tracker_sparql_builder_object_unvalidated (preupdate, s);
+ if (artist_uri) {
+ tracker_sparql_builder_predicate (preupdate, "nmm:albumArtist");
+ tracker_sparql_builder_object_iri (preupdate, artist_uri);
+ }
+
tracker_sparql_builder_insert_close (preupdate);
has_it = gst_tag_list_get_uint (extractor->tagcache,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]