[rygel] server: Serialize import_uri in MediaResource



commit 1d45866a3fd7ca47bdbea60156bd18b994710662
Author: Jens Georg <mail jensge org>
Date:   Sun Aug 2 19:32:55 2015 +0200

    server: Serialize import_uri in MediaResource
    
    Previously it was not taken into account.
    
    Signed-off-by: Jens Georg <mail jensge org>

 src/librygel-server/rygel-media-resource.vala |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/src/librygel-server/rygel-media-resource.vala b/src/librygel-server/rygel-media-resource.vala
index 961cec2..2f9db6e 100644
--- a/src/librygel-server/rygel-media-resource.vala
+++ b/src/librygel-server/rygel-media-resource.vala
@@ -136,10 +136,19 @@ public class Rygel.MediaResource : GLib.Object {
                                       HashTable<string, string>? replacements) {
         // Note: For a DIDLLiteResource, a values -1/null also signal "not set"
         if (replacements == null) {
-            didl_resource.uri = this.uri;
+            if (this.import_uri != null) {
+                didl_resource.import_uri = this.import_uri;
+            } else {
+                didl_resource.uri = this.uri;
+            }
         } else {
-            didl_resource.uri = MediaObject.apply_replacements (replacements,
-                                                                this.uri);
+            if (this.import_uri != null) {
+                didl_resource.import_uri = MediaObject.apply_replacements
+                    (replacements, this.import_uri);
+            } else {
+                didl_resource.uri = MediaObject.apply_replacements (replacements,
+                                                                    this.uri);
+            }
         }
         didl_resource.size64 = this.size;
         didl_resource.cleartext_size = this.cleartext_size;



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