[rygel/wip/create-reference: 10/10] media-export: Always show playlist container



commit b316db294078b7a412bbe183f0cf488aa1b54052
Author: Jens Georg <jensg openismus com>
Date:   Wed Apr 10 16:25:28 2013 +0200

    media-export: Always show playlist container

 .../rygel-media-export-root-container.vala         |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-root-container.vala 
b/src/plugins/media-export/rygel-media-export-root-container.vala
index 1cd62d2..d2a9e05 100644
--- a/src/plugins/media-export/rygel-media-export-root-container.vala
+++ b/src/plugins/media-export/rygel-media-export-root-container.vala
@@ -653,9 +653,14 @@ public class Rygel.MediaExport.RootContainer : TrackableDbContainer {
         }
 
         // If no child QueryContainers were added, remove
-        // the provided parent container.
+        // the provided parent container. Unless it's the Playlist container.
         if (this.media_db.get_child_count (container.id) == 0) {
-            this.media_db.remove_by_id (container.id);
+            if (!container.id.has_prefix ("virtual-parent:" +
+                                Rygel.PlaylistItem.UPNP_CLASS)) {
+                this.media_db.remove_by_id (container.id);
+            } else {
+                container.updated ();
+            }
         } else {
             container.updated ();
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]