From 88d8430f98f61a9a37d7bb9f8bcc8e819e92b3e6 Mon Sep 17 00:00:00 2001 From: 0xboobface <0xboobface@gmail.com> Date: Sat, 27 Oct 2018 23:27:44 +0200 Subject: [PATCH] Added sleep to resolution update task ...to throttle the number of request fired in a small amount of time --- src/main/java/ctbrec/ui/ThumbCell.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ctbrec/ui/ThumbCell.java b/src/main/java/ctbrec/ui/ThumbCell.java index 265b7e67..e7306d3b 100644 --- a/src/main/java/ctbrec/ui/ThumbCell.java +++ b/src/main/java/ctbrec/ui/ThumbCell.java @@ -207,6 +207,8 @@ public class ThumbCell extends StackPane { LOG.trace("Removing invalid resolution value for {}", model.getName()); model.invalidateCacheEntries(); } + + Thread.sleep(500); } catch (ExecutionException | IOException | InterruptedException e1) { LOG.warn("Couldn't update resolution tag for model {}", model.getName(), e1); } finally { @@ -412,13 +414,11 @@ public class ThumbCell extends StackPane { } public void setModel(Model model) { - //this.model = model; this.model.setName(model.getName()); this.model.setDescription(model.getDescription()); this.model.setPreview(model.getPreview()); this.model.setTags(model.getTags()); this.model.setUrl(model.getUrl()); - update(); }