|
|
@ -47,6 +47,9 @@ public class PluginSearchManager implements AlphaFineSearchProcessor { |
|
|
|
HttpClient httpClient = new HttpClient(url); |
|
|
|
HttpClient httpClient = new HttpClient(url); |
|
|
|
httpClient.setTimeout(5000); |
|
|
|
httpClient.setTimeout(5000); |
|
|
|
httpClient.asGet(); |
|
|
|
httpClient.asGet(); |
|
|
|
|
|
|
|
if (!httpClient.isServerAlive()) { |
|
|
|
|
|
|
|
return lessModelList; |
|
|
|
|
|
|
|
} |
|
|
|
result = httpClient.getResponseText(); |
|
|
|
result = httpClient.getResponseText(); |
|
|
|
JSONObject jsonObject = new JSONObject(result); |
|
|
|
JSONObject jsonObject = new JSONObject(result); |
|
|
|
JSONArray jsonArray = jsonObject.optJSONArray("result"); |
|
|
|
JSONArray jsonArray = jsonObject.optJSONArray("result"); |
|
|
@ -99,7 +102,7 @@ public class PluginSearchManager implements AlphaFineSearchProcessor { |
|
|
|
type = CellType.REUSE; |
|
|
|
type = CellType.REUSE; |
|
|
|
} |
|
|
|
} |
|
|
|
int price = object.optInt("price"); |
|
|
|
int price = object.optInt("price"); |
|
|
|
return new PluginModel(name, content, imageUrl, version, jartime, type, price, pluginId); |
|
|
|
return new PluginModel(name, content, imageUrl, version, jartime, link, type, price, pluginId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -111,8 +114,10 @@ public class PluginSearchManager implements AlphaFineSearchProcessor { |
|
|
|
JSONObject jsonObject = object.optJSONObject("result"); |
|
|
|
JSONObject jsonObject = object.optJSONObject("result"); |
|
|
|
if (jsonObject != null) { |
|
|
|
if (jsonObject != null) { |
|
|
|
return getPluginModel(jsonObject, true); |
|
|
|
return getPluginModel(jsonObject, true); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return getPluginModel(object, false); |
|
|
|
} |
|
|
|
} |
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|