From: Zeeshan Ali (Khattak) Date: Mon, 11 May 2009 15:16:42 +0000 (+0300) Subject: Substitute "://@HOSTNAME@" with hostname X-Git-Tag: RYGEL_0_3~78 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c01e9d151c8bec90abd5dafb011e07ef80632638;p=profile%2Fivi%2Frygel.git Substitute "://@HOSTNAME@" with hostname --- diff --git a/src/plugins/external/rygel-external-container.vala b/src/plugins/external/rygel-external-container.vala index 4001d4f..f4c31a1 100644 --- a/src/plugins/external/rygel-external-container.vala +++ b/src/plugins/external/rygel-external-container.vala @@ -39,6 +39,8 @@ public class Rygel.ExternalContainer : MediaContainer { public dynamic DBus.Object actual_container; + public string host_ip; + private string service_name; private string object_path; @@ -47,11 +49,13 @@ public class Rygel.ExternalContainer : MediaContainer { public ExternalContainer (string id, string service_name, string object_path, + string host_ip, ExternalContainer? parent) { base (id, parent, "Uknown", 0); this.service_name = service_name; this.object_path = object_path; + this.host_ip = host_ip; this.media_objects = new ArrayList (); @@ -147,6 +151,7 @@ public class Rygel.ExternalContainer : MediaContainer { this.media_objects.add (new ExternalContainer (object_path, this.service_name, (string) object_path, + this.host_ip, this)); } diff --git a/src/plugins/external/rygel-external-content-dir.vala b/src/plugins/external/rygel-external-content-dir.vala index 595e252..ea4a5ce 100644 --- a/src/plugins/external/rygel-external-content-dir.vala +++ b/src/plugins/external/rygel-external-content-dir.vala @@ -38,6 +38,7 @@ public class Rygel.ExternalContentDir : ContentDirectory { return new ExternalContainer ("0", plugin.service_name, plugin.root_object, + this.context.host_ip, null); } } diff --git a/src/plugins/external/rygel-external-item.vala b/src/plugins/external/rygel-external-item.vala index ef573df..096dd73 100644 --- a/src/plugins/external/rygel-external-item.vala +++ b/src/plugins/external/rygel-external-item.vala @@ -72,7 +72,8 @@ public class Rygel.ExternalItem : MediaItem { weak string[] uris = (string[]) value.get_boxed (); foreach (var uri in uris) { - this.uris.add (uri); + var tmp = uri.replace ("://@HOSTNAME@", parent.host_ip); + this.uris.add (tmp); } } }