public OnlineMusicInfo(FiltratedData QQMusicSong)
 {
     title  = QQMusicSong.SongTitle;
     album  = QQMusicSong.Album;
     id     = QQMusicSong.SongMid;
     artist = QQMusicSong.Aritist;
 }
Example #2
0
 /// <summary>
 /// 提取搜索结果中有用的信息
 /// </summary>
 /// <param name="title">搜索标题</param>
 /// <returns></returns>
 public static FiltratedData[] GetFiltratedSearchResult(string title)
 {
     QQMusicSearchData rawdata = GetSearchResult(title);
     FiltratedData[] datas=new FiltratedData[rawdata.data.song.list.Count];
     for (int i = 0; i < datas.Length; i++)
     {
         datas[i]=new FiltratedData();
         datas[i].Album = rawdata.data.song.list[i].albumname;
         foreach (var singer in rawdata.data.song.list[i].singer)
         {
             if (datas[i].Aritist != null) datas[i].Aritist += "/" + singer.name;
             else datas[i].Aritist = singer.name;
         }
         datas[i].SongId = rawdata.data.song.list[i].songid;
         datas[i].SongMid = rawdata.data.song.list[i].songmid;
         datas[i].SongTitle = rawdata.data.song.list[i].songname;
     }
     return datas;
 }