Пример #1
0
        private static string GetUrl(string type, string id, string quality, string format)
        {
            IMusic music;

            switch (type)
            {
            case "wy":
                music = new WyMusic();
                break;

            case "xm":
                music = new XmMusic();
                break;

            case "tt":
                music = new TtMusic();
                break;

            case "qq":
                music = new TxMusic();
                break;

            case "bd":
                music = new BdMusic();
                break;

            default:
                return(null);
            }
            return(music.GetSongUrl(id, quality, format));
        }
Пример #2
0
        private static ArtistResult SearchArtist(string type, string id, string page, string size)
        {
            IMusic music;

            switch (type)
            {
            case "wy":
                music = new WyMusic();
                break;

            case "xm":
                music = new XmMusic();
                break;

            case "tt":
                music = new TtMusic();
                break;

            case "qq":
                music = new TxMusic();
                break;

            case "bd":
                music = new BdMusic();
                break;

            default:
                return(null);
            }
            return(music.ArtistSearch(id, Convert.ToInt32(page), Convert.ToInt32(size)));
        }
Пример #3
0
        private static SongResult SearchSong(string type, string id)
        {
            IMusic music;

            switch (type)
            {
            case "wy":
                music = new WyMusic();
                break;

            case "xm":
                music = new XmMusic();
                break;

            case "tt":
                music = new TtMusic();
                break;

            case "qq":
                music = new TxMusic();
                break;

            case "bd":
                music = new BdMusic();
                break;

            default:
                return(null);
            }
            return(music.GetSingleSong(id));
        }
Пример #4
0
        private static AlbumResult AlbumSearch(string type, string id)
        {
            IMusic music;

            switch (type)
            {
            case "wy":
                music = new WyMusic();
                break;

            case "xm":
                music = new XmMusic();
                break;

            case "tt":
                music = new TtMusic();
                break;

            case "qq":
                music = new TxMusic();
                break;

            case "bd":
                music = new BdMusic();
                break;

            default:
                return(null);
            }
            return(music.AlbumSearch(id));
        }
Пример #5
0
        private static SearchResult Search(string type, string key, string page, string size)
        {
            IMusic music;

            switch (type)
            {
            case "wy":
                music = new WyMusic();
                break;

            case "xm":
                music = new XmMusic();
                break;

            case "tt":
                music = new TtMusic();
                break;

            case "qq":
                music = new TxMusic();
                break;

            case "bd":
                music = new BdMusic();
                break;

            default:
                music = new AnyMusic();
                break;
            }
            return(music.SongSearch(key, Convert.ToInt32(page), Convert.ToInt32(size)));
        }