Make offlineImageSize static
This commit is contained in:
parent
b03a1acc20
commit
f6e02b4a35
|
@ -38,7 +38,7 @@ public class ChaturbateModel extends AbstractModel {
|
|||
private int[] resolution = new int[2];
|
||||
private transient StreamInfo streamInfo;
|
||||
private transient Instant lastStreamInfoRequest = Instant.EPOCH;
|
||||
private transient int offlineImageSize = 0;
|
||||
private static int offlineImageSize = 0;
|
||||
private final transient ObjectMapper mapper = ObjectMapperFactory.getMapper();
|
||||
|
||||
/**
|
||||
|
@ -76,7 +76,7 @@ public class ChaturbateModel extends AbstractModel {
|
|||
String normalizedName = getName().toLowerCase().trim();
|
||||
String previewUrl = "https://roomimg.stream.highwebmedia.com/ri/" + normalizedName + ".jpg?" + Instant.now().getEpochSecond();
|
||||
if (offlineImageSize == 0) {
|
||||
offlineImageSize = getOfflineImageSize();
|
||||
offlineImageSize = getOfflineImageSize(); // NOSONAR
|
||||
}
|
||||
return getImageSize(previewUrl) == offlineImageSize;
|
||||
}
|
||||
|
@ -92,7 +92,6 @@ public class ChaturbateModel extends AbstractModel {
|
|||
}
|
||||
|
||||
private int getImageSize(String url) {
|
||||
log.debug("######## Get image size");
|
||||
int imageSize = 0;
|
||||
Request req = new Request.Builder()
|
||||
.url(url)
|
||||
|
|
Loading…
Reference in New Issue