media-db: No need to reparent
authorJens Georg <mail@jensge.org>
Fri, 20 Nov 2009 23:54:04 +0000 (00:54 +0100)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Tue, 19 Jan 2010 15:04:36 +0000 (17:04 +0200)
src/rygel/rygel-media-db-container.vala

index 02511ac..44f4d18 100644 (file)
@@ -81,15 +81,12 @@ public class Rygel.MediaDBContainer : MediaContainer {
         for (int i = 0; i < args.n_values; i++)
             debug ("Arg %d: %s", i, args.get_nth(i).get_string());
 
-        var children = this.media_db.get_children_with_filter (filter,
-                                                               args,
-                                                               this.id,
-                                                               offset,
-                                                               max_count);
-        foreach (var child in children) {
-            child.parent = this;
-        }
-
+        var children = this.media_db.get_children_with_filter (
+                                            filter,
+                                            args,
+                                            this.id,
+                                            offset,
+                                            max_count == 0 ? -1 :  max_count);
         return children;
     }