tracker: Create a unique URI for new items
authorJens Georg <mail@jensge.org>
Wed, 13 Apr 2011 11:49:44 +0000 (14:49 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Wed, 13 Apr 2011 12:23:21 +0000 (15:23 +0300)
Previously items with the same title had the same URI, leading to
constraint failed errors

src/rygel/rygel-item-creator.vala

index f761377..a73656d 100644 (file)
@@ -294,9 +294,10 @@ internal class Rygel.ItemCreator: GLib.Object, Rygel.StateMachine {
                                          container.id);
         }
 
+        var now = new GLib.DateTime.now_utc ();
         var file = dir.get_child_for_display_name (title);
 
-        return file.get_uri ();
+        return file.get_uri () + now.format ("%s");
     }
 
     private async void wait_for_item (WritableContainer container) {