Beispiel #1
0
 /// <summary>
 /// 获取歌词方法
 /// </summary>
 /// <param name="info">歌词基本信息</param>
 /// <returns>歌词内容</returns>
 public string GetLyricContent(MusicLrcInfo info)
 {
     Crawler crawler = new Crawler();
     //ILRCSearch objsearch = lrcSearcher.Find((x) => x.Key.Trim().Equals(objuid.ToString())).Value;
     if (mcc.LRCSearcher.Count < 1)
     {
         return string.Empty;
     }
     //TODO:
     ILRCSearch objsearch = mcc.LRCSearcher[0];
     return crawler.GetMusicLyric(info, objsearch);
 }
Beispiel #2
0
 /// <summary>
 /// 搜索歌词列表方法
 /// </summary>
 /// <param name="info">搜索信息</param>
 /// <returns>歌词列表</returns>
 public List<MusicLrcInfo> SearchL(SearchMusicInfo info)
 {
     Crawler crawler = new Crawler();
     List<MusicLrcInfo> lstMusic = new List<MusicLrcInfo>();
     foreach (var item in mcc.LRCSearcher)
     {
         //根据加载的插件所提供的方法,获取歌词信息
         lstMusic.AddRange(crawler.GetMusicLrcList(info, item));
     }
     return lstMusic;
 }
Beispiel #3
0
        /// <summary>
        /// 搜索歌曲方法
        /// </summary>
        /// <param name="info">搜索信息</param>
        /// <returns>歌曲列表</returns>
        public List<MusicInfo> SearchM(SearchMusicInfo info)
        {
            Crawler crawler = new Crawler();
            List<MusicInfo> lstMusic = new List<MusicInfo>();

            // 遍历插件,搜索音乐
            foreach (var item in mcc.MusicSearcher)
            {
                //根据加载的插件所提供的方法,获取音乐信息
                lstMusic.AddRange(crawler.GetMusicList(info, item.Value));
            }
            MusicDistinctHelper.Distinct(ref lstMusic);
            //TODO:在各自的插件中过滤MusicFormat后,在这里是否最终输出也过滤一次
            return lstMusic;
        }