[PATCH 10/14] tracker: slight rework of sparql SELECTs
- From: llandwerlin gmail com
- To: grilo-list gnome org
- Subject: [PATCH 10/14] tracker: slight rework of sparql SELECTs
- Date: Mon, 17 Jan 2011 10:18:07 +0000
From: Lionel Landwerlin <lionel g landwerlin linux intel com>
Signed-off-by: Lionel Landwerlin <lionel g landwerlin linux intel com>
---
src/tracker/grl-tracker.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/tracker/grl-tracker.c b/src/tracker/grl-tracker.c
index f54f16e..e6fbc38 100644
--- a/src/tracker/grl-tracker.c
+++ b/src/tracker/grl-tracker.c
@@ -72,7 +72,7 @@ enum {
/* --- Other --- */
#define TRACKER_BROWSE_FLAT_REQUEST " \
- SELECT %s \
+ SELECT rdf:type(?urn) %s \
WHERE { \
{ ?urn a nmm:Video } UNION \
{ ?urn a nmm:Photo } UNION \
@@ -83,7 +83,7 @@ enum {
OFFSET %i LIMIT %i"
#define TRACKER_BROWSE_DIRECTORY_ROOT_REQUEST " \
- SELECT %s nie:isPartOf(?urn) AS ?parent \
+ SELECT rdf:type(?urn) %s nie:isPartOf(?urn) AS ?parent \
WHERE { \
?urn a nfo:Folder . \
?urn tracker:available ?tr . \
@@ -94,7 +94,7 @@ enum {
OFFSET %i LIMIT %i"
#define TRACKER_BROWSE_DIRECTORY_CONT_REQUEST " \
- SELECT %s \
+ SELECT rdf:type(?urn) %s \
WHERE { \
{ ?urn a nfo:Folder } UNION \
{ ?urn a nmm:Video } UNION \
@@ -107,16 +107,16 @@ enum {
OFFSET %i LIMIT %i"
#define TRACKER_BROWSE_CATEGORY_REQUEST " \
- SELECT %s \
+ SELECT rdf:type(?urn) %s \
WHERE { \
{ ?urn a %s } \
?urn tracker:available ?tr \
} \
- ORDER BY DESC(nfo:fileLastModified(?urn)) \
+ ORDER BY DESC(nfo:fileLastModified(?urn)) \
OFFSET %i LIMIT %i"
#define TRACKER_SEARCH_REQUEST " \
- SELECT %s \
+ SELECT rdf:type(?urn) %s \
WHERE { \
{ ?urn a nmm:Video } UNION \
{ ?urn a nmm:Photo } UNION \
@@ -581,7 +581,7 @@ static gchar *
get_select_string (GrlMediaSource *source, const GList *keys)
{
const GList *key = keys;
- GString *gstr = g_string_new ("rdf:type(?urn) ");
+ GString *gstr = g_string_new ("");
GList *assoc_list;
tracker_grl_sparql_t *assoc;
@@ -799,7 +799,7 @@ tracker_metadata_cb (GObject *source_object,
tracker_sparql_cursor_next (cursor, NULL, NULL);
/* Translate Sparql result into Grilo result */
- for (col = 1 ; col < tracker_sparql_cursor_get_n_columns (cursor) ; col++) {
+ for (col = 0 ; col < tracker_sparql_cursor_get_n_columns (cursor) ; col++) {
fill_grilo_media_from_sparql (ms->media, cursor, col);
}
--
1.7.2.3
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]