use of com.frostwire.search.soundcloud.SoundcloudSearchResult in project frostwire by frostwire.
the class DownloadSoundcloudFromUrlTask method doInBackground.
@Override
protected List<SoundcloudSearchResult> doInBackground() {
List<SoundcloudSearchResult> results = new ArrayList<>();
try {
String url = soundcloudUrl;
if (soundcloudUrl.contains("?in=")) {
url = soundcloudUrl.substring(0, url.indexOf("?in="));
}
String resolveURL = SoundcloudSearchPerformer.resolveUrl(url);
HttpClient client = HttpClientFactory.getInstance(HttpClientFactory.HttpContext.DOWNLOAD);
String json = client.get(resolveURL, 10000);
results = SoundcloudSearchPerformer.fromJson(json);
} catch (Throwable e) {
e.printStackTrace();
}
return results;
}
Aggregations