media-export: Always show playlist container
authorJens Georg <jensg@openismus.com>
Wed, 10 Apr 2013 14:25:28 +0000 (16:25 +0200)
committerJens Georg <jensg@openismus.com>
Tue, 30 Apr 2013 08:46:55 +0000 (10:46 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=697949

src/plugins/media-export/rygel-media-export-root-container.vala

index 1fe4523..8da3565 100644 (file)
@@ -653,8 +653,10 @@ public class Rygel.MediaExport.RootContainer : TrackableDbContainer {
         }
 
         // If no child QueryContainers were added, remove
-        // the provided parent container.
-        if (this.media_db.get_child_count (container.id) == 0) {
+        // the provided parent container. Unless it's the Playlist container.
+        if (this.media_db.get_child_count (container.id) == 0 &&
+            !container.id.has_prefix ("virtual-parent:" +
+                                      Rygel.PlaylistItem.UPNP_CLASS)) {
             this.media_db.remove_by_id (container.id);
         } else {
             container.updated ();