using Helper;
using IDAL;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DAL
{
   public class Together1:IMusic
    {
        public List<Music> Search(string word, int page, int num)
        {
            List<Music> list = new List<Music>();
            list.AddRange(new Kuwo().Search(word, page, num / 5));
            list.AddRange(new Netease().Search(word,page,num/5));
            list.AddRange(new Kugou().Search(word, page, num/5));
            list.AddRange(new QQ().Search(word, page, num/5));
            list.AddRange(new Xiami().Search(word, page, num/5));
            List<Music> result = new List<Music>();
            foreach (Music item in list)
            {
                if (!result.Contains(item))
                { result.Add(item); }
            }
            return result;
        }

        public List<Music> SearchCollection(string id)
        {
            return new List<Music>();
        }

        public bool GetData(Music m)
        {
            throw new NotImplementedException();
        }

        public void GetLrc(Music m)
        {
            throw new NotImplementedException();
        }
    }
}
