[rygel] media-export: Small refactor



commit c99a5c0d91e8654c4ee6b2d4b3abf2326bb75d9f
Author: Jens Georg <mail jensge org>
Date:   Sun Mar 14 11:09:30 2010 +0100

    media-export: Small refactor

 .../rygel-media-export-query-container.vala        |    4 ++--
 .../rygel-media-export-root-container.vala         |    6 +++---
 2 files changed, 5 insertions(+), 5 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 dc0cd7c..3130c87 100644
--- a/src/plugins/media-export/rygel-media-export-query-container.vala
+++ b/src/plugins/media-export/rygel-media-export-query-container.vala
@@ -207,7 +207,7 @@ internal class Rygel.MediaExportQueryContainer : Rygel.MediaDBContainer {
             // pattern contains URL escaped text. This means it might
             // contain '%' chars which will makes sprintf crash
             new_id = this.pattern.replace ("%s", new_id);
-            new_id = register_virtual_container (new_id);
+            new_id = register_id (new_id);
             var container = new MediaExportQueryContainer (this.media_db,
                                                            new_id,
                                                            meta_data);
@@ -219,7 +219,7 @@ internal class Rygel.MediaExportQueryContainer : Rygel.MediaDBContainer {
         return children;
     }
 
-    public static string register_virtual_container (string id) {
+    public static string register_id (string id) {
         var md5 = Checksum.compute_for_string (ChecksumType.MD5, id);
         if (virtual_container_map == null) {
             virtual_container_map = new HashMap<string,string> ();
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 12c0d68..788f5ae 100644
--- a/src/plugins/media-export/rygel-media-export-root-container.vala
+++ b/src/plugins/media-export/rygel-media-export-root-container.vala
@@ -108,14 +108,14 @@ public class Rygel.MediaExportRootContainer : Rygel.MediaDBContainer {
                 case "object.container.album.musicAlbum":
                     return new MediaExportQueryContainer (
                                        this.media_db,
-                                       MediaExportQueryContainer.register_virtual_container
+                                       MediaExportQueryContainer.register_id
                                        ("virtual-container:upnp:album,?"),
                                        "Albums");
 
                 case "object.container.person.musicArtist":
                     return new MediaExportQueryContainer (
                                        this.media_db,
-                                       MediaExportQueryContainer.register_virtual_container
+                                       MediaExportQueryContainer.register_id
                                        ("virtual-container:dc:creator,?,upnp:album,?"),
                                        "Artists");
                 default:
@@ -189,7 +189,7 @@ public class Rygel.MediaExportRootContainer : Rygel.MediaDBContainer {
                                 Uri.escape_string (exp_.operand2, "", true) +
                                 cont.plaintext_id.replace ("virtual-container:", ",");
                 debug ("Translated search request to %s", new_id);
-                new_id = MediaExportQueryContainer.register_virtual_container (new_id);
+                new_id = MediaExportQueryContainer.register_id (new_id);
                 var query_cont_ = new MediaExportQueryContainer (this.media_db,
                                                             new_id,
                                                             exp_.operand2);



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