[rygel] tracker: Correct RDF query in 'search'
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rygel] tracker: Correct RDF query in 'search'
- Date: Mon, 16 Nov 2009 23:18:35 +0000 (UTC)
commit a2607b12d88471c521e000e771ba90c6029a188d
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Nov 12 14:53:37 2009 +0200
tracker: Correct RDF query in 'search'
"File:Path" means path to the directory containing the file rather than
path of the file itself. Full points goes to Mr. Jamie McCracken for
coming-up with this.
.../tracker/rygel-tracker-search-container.vala | 23 ++++++++++++++-----
1 files changed, 17 insertions(+), 6 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-search-container.vala b/src/plugins/tracker/rygel-tracker-search-container.vala
index d4c9f8a..e5a2831 100644
--- a/src/plugins/tracker/rygel-tracker-search-container.vala
+++ b/src/plugins/tracker/rygel-tracker-search-container.vala
@@ -214,13 +214,24 @@ public class Rygel.TrackerSearchContainer : Rygel.MediaContainer {
out parent_id,
out service);
if (path != null) {
+ var dir = Path.get_dirname (path);
+ var basename = Path.get_basename (path);
+
var search_condition =
- "<rdfq:equals>\n" +
- "<rdfq:Property " +
- "name=\"File:Path\" />\n" +
- "<rdf:String>" + path +
- "</rdf:String>\n" +
- "</rdfq:equals>\n";
+ "<rdfq:and>\n" +
+ "<rdfq:equals>\n" +
+ "<rdfq:Property " +
+ "name=\"File:Path\" />\n" +
+ "<rdf:String>" + dir +
+ "</rdf:String>\n" +
+ "</rdfq:equals>\n" +
+ "<rdfq:equals>\n" +
+ "<rdfq:Property " +
+ "name=\"File:Name\" />\n" +
+ "<rdf:String>" + basename +
+ "</rdf:String>\n" +
+ "</rdfq:equals>\n" +
+ "</rdfq:and>\n";
if (this.query_condition != "") {
query = "<rdfq:Condition>\n" +
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]