[rygel] media-export: Guess name of virtual container



commit 2d9714a5ddf266c15a430cffac433024f3c7dd0b
Author: Jens Georg <mail jensge org>
Date:   Mon Mar 29 18:41:54 2010 +0200

    media-export: Guess name of virtual container
    
    If no title is given the virtual containter tries now to guess its own
    name.

 .../rygel-media-export-query-container.vala        |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-query-container.vala b/src/plugins/media-export/rygel-media-export-query-container.vala
index be27036..5307376 100644
--- a/src/plugins/media-export/rygel-media-export-query-container.vala
+++ b/src/plugins/media-export/rygel-media-export-query-container.vala
@@ -68,7 +68,7 @@ internal class Rygel.MediaExportQueryContainer : Rygel.MediaDBContainer {
 
     public MediaExportQueryContainer (MediaDB media_db,
                                       string  id,
-                                      string  name) {
+                                      string  name = "") {
         // parse the id
         // Following the schema:
         // virtual-folder:<class>,? -> get all of that class (eg. Albums)
@@ -102,6 +102,9 @@ internal class Rygel.MediaExportQueryContainer : Rygel.MediaDBContainer {
         while (i < args.length) {
             if (args[i + 1] != "?") {
                 update_search_expression (args[i], args[i + 1]);
+                if (name == "") {
+                    this.title = args[i + 1];
+                }
             } else {
                 args[i + 1] = "%s";
                 this.attribute = args[i].replace (PREFIX, "");



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