Пример #1
0
        public static List <TrackID> resolveListTrackIDs(String url)
        {
            // https://soundcloud.com/khoidarealest/sets/she-ep
            List <TrackID> ret = new List <TrackID>();

            int    currentindex = 0;
            string str          = GetSourceURL("http://api.soundcloud.com/resolve.json?url=" + url + "&client_id=" + clientID + "&limit=1000");

            while (str.IndexOf("\"track\",\"id\":", currentindex) > 0)
            {
                TrackID t = SearchTrackID(str, currentindex);
                currentindex = t.index + 1;
                ret.Add(t);
            }
            return(ret);
        }
Пример #2
0
        public static List <TrackID> resolveUserTrackID(string url)
        {
            // https://soundcloud.com/khoidarealest
            string         s            = GetSourceURL("http://api.soundcloud.com/resolve.json?url=" + url + "&client_id=" + clientID);
            string         id           = GetStringGroup(s, "\"id\":", ",", 0);
            string         str          = GetSourceURL("http://api.soundcloud.com/users/" + id + "/tracks.json?client_id=" + clientID + "&limit=1000");
            List <TrackID> ret          = new List <TrackID>();
            int            currentindex = 0;

            while (str.IndexOf("\"track\",\"id\":", currentindex) > 0)
            {
                TrackID t = SearchTrackID(str, currentindex);
                currentindex = t.index + 1;
                ret.Add(t);
            }
            return(ret);
        }