Disabled the recording animation, because it takes up a lot of CPU

This commit is contained in:
0xboobface 2018-07-25 17:41:03 +02:00
parent 1b9b0998e1
commit a9178a2d21
1 changed files with 5 additions and 3 deletions

View File

@ -208,6 +208,7 @@ public class ThumbCell extends StackPane {
private void determineResolution() { private void determineResolution() {
if(ThumbOverviewTab.resolutionProcessing.contains(model)) { if(ThumbOverviewTab.resolutionProcessing.contains(model)) {
LOG.trace("Already fetching resolution for model {}", model.getName());
return; return;
} }
@ -253,6 +254,7 @@ public class ThumbCell extends StackPane {
// when we first requested the stream info, so we remove this invalid value from the "cache" // when we first requested the stream info, so we remove this invalid value from the "cache"
// so that it is requested again // so that it is requested again
if(model.isOnline() && res[1] == 0) { if(model.isOnline() && res[1] == 0) {
LOG.debug("Removing invalid resolution value for {}", model.getName());
resolutions.remove(model.getName()); resolutions.remove(model.getName());
} }
} }
@ -351,13 +353,13 @@ public class ThumbCell extends StackPane {
private void setRecording(boolean recording) { private void setRecording(boolean recording) {
if(recording) { if(recording) {
recordingAnimation.playFromStart(); //recordingAnimation.playFromStart();
colorNormal = colorRecording; colorNormal = colorRecording;
nameBackground.setFill(colorNormal); nameBackground.setFill(colorNormal);
} else { } else {
colorNormal = Color.BLACK; colorNormal = Color.BLACK;
nameBackground.setFill(colorNormal); nameBackground.setFill(colorNormal);
recordingAnimation.stop(); //recordingAnimation.stop();
} }
recordingIndicator.setVisible(recording); recordingIndicator.setVisible(recording);
} }
@ -429,7 +431,6 @@ public class ThumbCell extends StackPane {
public void run() { public void run() {
try { try {
if(start) { if(start) {
// start the recording
recorder.startRecording(model); recorder.startRecording(model);
} else { } else {
recorder.stopRecording(model); recorder.stopRecording(model);
@ -486,6 +487,7 @@ public class ThumbCell extends StackPane {
LOG.debug(msg); LOG.debug(msg);
throw new IOException("Response was " + msg.substring(0, Math.min(msg.length(), 500))); throw new IOException("Response was " + msg.substring(0, Math.min(msg.length(), 500)));
} else { } else {
LOG.debug("Follow/Unfollow -> {}", msg);
if(!follow) { if(!follow) {
Platform.runLater(() -> thumbCellList.remove(ThumbCell.this)); Platform.runLater(() -> thumbCellList.remove(ThumbCell.this));
} }