From b52dc1d6ef3a5b24bbad7dd5f807e7724f8a5898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Warin?= Date: Mon, 5 Oct 2015 15:30:30 +0200 Subject: [PATCH] Release 1.4 Build 15258 Fixes #4 : the ContentDirectory service only include one resource with the receiver's IP --- SWYH/Properties/AssemblyInfo.cs | 2 +- SWYH/UPnP/DvContentDirectory.cs | 37 ++++++++++++--------------------- 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/SWYH/Properties/AssemblyInfo.cs b/SWYH/Properties/AssemblyInfo.cs index 25e91e7..e79d5d5 100644 --- a/SWYH/Properties/AssemblyInfo.cs +++ b/SWYH/Properties/AssemblyInfo.cs @@ -75,5 +75,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.4.0.0")] -[assembly: AssemblyFileVersion("1.4.15154.0")] // MAJOR.minor.BuildDate.Release (Si Release impaire = BETA) || http://www.epochconverter.com/epoch/daynumbers.php +[assembly: AssemblyFileVersion("1.4.15278.0")] // MAJOR.minor.BuildDate.Release (Si Release impaire = BETA) || http://www.epochconverter.com/epoch/daynumbers.php [assembly: GuidAttribute("2ecd245f-4268-48ee-b0f1-0706ead1ba42")] diff --git a/SWYH/UPnP/DvContentDirectory.cs b/SWYH/UPnP/DvContentDirectory.cs index 2b585eb..a1e4f62 100644 --- a/SWYH/UPnP/DvContentDirectory.cs +++ b/SWYH/UPnP/DvContentDirectory.cs @@ -23,14 +23,14 @@ namespace SWYH.UPnP { + using OpenSource.UPnP; + using OpenSource.UPnP.AV.CdsMetadata; + using SWYH.Audio; using System; using System.Collections.Generic; using System.Text; using System.Web; using System.Xml; - using OpenSource.UPnP; - using OpenSource.UPnP.AV.CdsMetadata; - using SWYH.Audio; /// /// Transparent DeviceSide UPnP Service @@ -1299,27 +1299,16 @@ protected string GetMusItem(string id, string parentID, string restricted, strin //Indie //object.item.audioItem.musicTrack // - StringBuilder ressources = new StringBuilder(); - foreach (var item in this.GetUPnPService().ParentDevice.LocalIPEndPoints) - { - if (item.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork && !item.ToString().StartsWith("127.0.0.1")) - { - string uri = "http://" + item.ToString() + "/stream/" + resFileName; - //sb.Append("" + HttpUtility.HtmlEncode(uri) + ""); - //sb.Append("" + HttpUtility.HtmlEncode(uri) + ""); - ressources.Append("" + HttpUtility.HtmlEncode(uri) + ""); - } - } - string retVal = - "" + - "" + HttpUtility.HtmlEncode(title) + "" + - ressources.ToString() + - "" + artist + "" + - "" + album + "" + - "" + genre + "" + - "" + upnpClass + "" + - ""; - return retVal; + return "" + + "" + HttpUtility.HtmlEncode(title) + "" + + "" + artist + "" + + "" + + HttpUtility.HtmlEncode("http://" + this.GetReceiver().ToString() + "/stream/" + resFileName) + + "" + + "" + album + "" + + "" + genre + "" + + "" + upnpClass + "" + + ""; } #region Not Implemented