tracker: Join item ID components by ',' rather than ':'
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Sun, 26 Sep 2010 21:22:17 +0000 (00:22 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Tue, 28 Sep 2010 13:54:50 +0000 (16:54 +0300)
Use ',' intead of ':' to join SearchContainer's ID and item's URN in the
child item's ID. This fixes item queries for Tracker backend. This issue
has been there since commit 51e4fdb (Feb 19 2010) but it didn't realize
so far because the default slow search used to kick-in and save the day.

src/plugins/tracker/rygel-tracker-search-container.vala

index 92f8d28..3026ea4 100644 (file)
@@ -164,11 +164,11 @@ public class Rygel.Tracker.SearchContainer : Rygel.MediaContainer {
     }
 
     public string create_child_id_for_urn (string urn) {
-        return this.id + ":" + urn;
+        return this.id + "," + urn;
     }
 
     private bool is_our_child (string id) {
-        return id.has_prefix (this.id + ":");
+        return id.has_prefix (this.id + ",");
     }
 
     private async void get_children_count () {
@@ -273,7 +273,7 @@ public class Rygel.Tracker.SearchContainer : Rygel.MediaContainer {
     // if item_id is invalid
     private string? get_item_info (string     item_id,
                                    out string parent_id) {
-        var tokens = item_id.split (":", 2);
+        var tokens = item_id.split (",", 2);
 
         if (tokens[0] != null && tokens[1] != null) {
             parent_id = tokens[0];