陈嘉乐
2020-08-04 a499dceb02f181e64956431ed0c682dd7d2ce7d7
HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs
@@ -209,7 +209,7 @@
                a31MusicModel.A31PlayStatus.loop = se.SearchForTextOfTag("LoopMode");
                a31MusicModel.A31PlayStatus.Source = se.SearchForTextOfTag("PlayMedium");
                a31MusicModel.A31PlayStatus.playSource = se.SearchForTextOfTag("TrackSource");
                a31MusicModel.A31PlayStatus.TrackURL = se.SearchForTextOfTag("TrackURI");
                a31MusicModel.A31PlayStatus.TrackURL = se.SearchForTextOfTag("TrackURI").Replace("&", "&");
            }
            catch (Exception ex)
@@ -520,14 +520,14 @@
            foreach (SecurityElement track in SecurityElement.FromString(se.Text).SearchForChildByTag("Tracks").Children)
            {
                MusicInfo musicInfo = new MusicInfo();
                musicInfo.URL = track.SearchForTextOfTag("URL");
                musicInfo.URL = track.SearchForTextOfTag("URL").Replace("&", "&");
                var metadata = track.SearchForTextOfTag("Metadata").Replace("&", "&");
                var item = SecurityElement.FromString(metadata).SearchForChildByTag("item");
                musicInfo.Title = item.SearchForTextOfTag("dc:title");
                musicInfo.Artist = item.SearchForTextOfTag("upnp:artist");
                musicInfo.Album = item.SearchForTextOfTag("upnp:album");
                musicInfo.Title = item.SearchForTextOfTag("dc:title").Replace("&", "&");
                musicInfo.Artist = item.SearchForTextOfTag("upnp:artist").Replace("&", "&");
                musicInfo.Album = item.SearchForTextOfTag("upnp:album").Replace("&", "&");
                musicInfo.Duration = item.SearchForTextOfTag("res");
                musicInfo.AlbumId = item.SearchForTextOfTag("song:albumid");
                musicInfo.AlbumId = item.SearchForTextOfTag("song:albumid").Replace("&", "&");
                musicInfoList.Add(musicInfo);
            }
            return musicInfoList;
@@ -654,7 +654,7 @@
        /// <param name="musicInfo">播放音乐</param>
        /// <param name="listName">列表名称</param>
        /// <param name="musicList">推送列表(默认推50首)</param>
        public  static void PushList(MusicInfo musicInfo, string listName, List<MusicInfo> musicList, A31MusicModel a31player,bool bool_listName = false)
        public  static void PushList(MusicInfo musicInfo, string listName, List<MusicInfo> musicList, A31MusicModel a31player,string musicSource)
        {
            //最大发送的条数
@@ -719,7 +719,6 @@
                    tempMusicInfo.URL = "http://" + new Shared.Net.NetWiFi().IpAddress + ":" + com.hdl.on.Server.Port + "/" + tempMusicInfo.ID;
                }
                sb.AppendLine("&lt;Track" + Tracknumber + "&gt;");
                sb.AppendLine("&lt;URL&gt;" + tempMusicInfo.URL + "&lt;/URL&gt;");
                sb.AppendLine("&lt;Metadata&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;");
@@ -738,13 +737,12 @@
                sb.AppendLine("&amp;lt;dc:title&amp;gt;" + tempMusicInfo.Title + "&amp;lt;/dc:title&amp;gt;");
                sb.AppendLine("&amp;lt;dc:creator&amp;gt;DJ Sanny J&amp;lt;/dc:creator&amp;gt;");
                if (bool_listName) {
                if (musicSource== "我的列表") {
                    sb.AppendLine("&amp;lt;upnp:artist&amp;gt;" + listName + "&amp;lt;/upnp:artist&amp;gt;");
                }
                else {
                    sb.AppendLine("&amp;lt;upnp:artist&amp;gt;" + tempMusicInfo.Artist + "&amp;lt;/upnp:artist&amp;gt;");
                }
                sb.AppendLine("&amp;lt;upnp:album&amp;gt;" + tempMusicInfo.Album + "&amp;lt;/upnp:album&amp;gt;");
                sb.AppendLine("&amp;lt;upnp:albumArtURI&amp;gt;unknown&amp;lt;/upnp:albumArtURI&amp;gt;");
                sb.AppendLine("&amp;lt;/item&amp;gt;");