forked from j62/ctbrec
1
0
Fork 0

Set online state to offline if model details cannot be loaded

This commit is contained in:
0xboobface 2018-11-27 17:53:37 +01:00
parent 55b219d271
commit c543af6429
1 changed files with 1 additions and 0 deletions

View File

@ -64,6 +64,7 @@ public class Cam4Model extends AbstractModel {
if(response.isSuccessful()) {
JSONArray json = new JSONArray(response.body().string());
if(json.length() == 0) {
onlineState = "offline";
throw new ModelDetailsEmptyException("Model details are empty");
}
JSONObject details = json.getJSONObject(0);