forked from j62/ctbrec
1
0
Fork 0

Use the small preview image for the thumbnails

This commit is contained in:
0xboobface 2020-05-16 22:45:15 +02:00
parent 66b37b65c0
commit a91923baff
1 changed files with 3 additions and 2 deletions

View File

@ -78,7 +78,7 @@ public class Showup extends AbstractSite {
try (Response response = getHttpClient().execute(req)) { try (Response response = getHttpClient().execute(req)) {
if (response.isSuccessful()) { if (response.isSuccessful()) {
String body = response.body().string(); String body = response.body().string();
LOG.trace(body); LOG.debug(body);
JSONObject json = new JSONObject(body); JSONObject json = new JSONObject(body);
models = new ArrayList<>(); models = new ArrayList<>();
JSONArray list = json.getJSONArray("list"); JSONArray list = json.getJSONArray("list");
@ -86,7 +86,8 @@ public class Showup extends AbstractSite {
JSONObject entry = list.getJSONObject(i); JSONObject entry = list.getJSONObject(i);
ShowupModel model = new ShowupModel(); ShowupModel model = new ShowupModel();
model.setUid(entry.getLong("uid")); model.setUid(entry.getLong("uid"));
model.setPreview(getBaseUrl() + "/files/" + entry.optString("big_img") + ".jpg"); //model.setPreview(getBaseUrl() + "/files/" + entry.optString("big_img") + ".jpg");
model.setPreview(getBaseUrl() + "/files/" + entry.optString("small_img") + ".jpg");
model.setDescription(entry.optString("description")); model.setDescription(entry.optString("description"));
model.setName(entry.optString("username")); model.setName(entry.optString("username"));
model.setUrl(getBaseUrl() + '/' + model.getName()); model.setUrl(getBaseUrl() + '/' + model.getName());