[rygel] tracker: Correct filter syntax
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rygel] tracker: Correct filter syntax
- Date: Sat, 5 Dec 2009 01:22:09 +0000 (UTC)
commit e2677f888b6e5f4fc1cfe3dedb72fcd58c548415
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Dec 3 16:57:14 2009 +0200
tracker: Correct filter syntax
src/plugins/tracker/rygel-tracker-query.vala | 12 ++++++++++--
.../tracker/rygel-tracker-search-container.vala | 2 +-
2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-query.vala b/src/plugins/tracker/rygel-tracker-query.vala
index e0b8878..28afac6 100644
--- a/src/plugins/tracker/rygel-tracker-query.vala
+++ b/src/plugins/tracker/rygel-tracker-query.vala
@@ -94,8 +94,16 @@ public class Rygel.TrackerQuery {
" . " +
this.serialize_triplets (this.optional);
- foreach (var filter in this.filters) {
- query += " " + filter;
+ if (this.filters.size > 0) {
+ query += " FILTER (";
+ for (var i = 0; i < this.filters.size; i++) {
+ query += this.filters[i];
+
+ if (i < this.filters.size - 1) {
+ query += " && ";
+ }
+ }
+ query += ")";
}
query += " }";
diff --git a/src/plugins/tracker/rygel-tracker-search-container.vala b/src/plugins/tracker/rygel-tracker-search-container.vala
index 6ba060e..159e7a1 100644
--- a/src/plugins/tracker/rygel-tracker-search-container.vala
+++ b/src/plugins/tracker/rygel-tracker-search-container.vala
@@ -220,7 +220,7 @@ public class Rygel.TrackerSearchContainer : Rygel.MediaContainer {
break;
}
- filter = ITEM_VARIABLE + " = " + uri;
+ filter = ITEM_VARIABLE + " = <" + uri + ">";
break;
case SearchCriteriaOp.CONTAINS:
filter = "regex(" + ITEM_VARIABLE + ", " +
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]