Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/nya/miku/wishmaster/api/AbstractVichanModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,12 @@ protected AttachmentModel mapAttachment(JSONObject object, String boardName, boo
attachment.originalName = object.optString("filename", "") + ext;
attachment.isSpoiler = isSpoiler;
String tim = object.optString("tim", "");
String thumbLocation = tim.length() == 64 ? "/file_store/thumb/" : "/" + boardName + "/thumb/";
String fileLocation = tim.length() == 64 ? "/file_store/" : "/" + boardName + "/src/";
if (tim.length() > 0) {
attachment.thumbnail = isSpoiler || attachment.type == AttachmentModel.TYPE_AUDIO ? null :
("/" + boardName + "/thumb/" + tim + ".jpg");
attachment.path = "/" + boardName + "/src/" + tim + ext;
(thumbLocation + tim + ".jpg");
attachment.path = fileLocation + tim + ext;
return attachment;
}
}
Expand Down