diff --git a/common/src/main/java/ctbrec/recorder/RemoteRecorder.java b/common/src/main/java/ctbrec/recorder/RemoteRecorder.java index 7552fbab..cfb5fd54 100644 --- a/common/src/main/java/ctbrec/recorder/RemoteRecorder.java +++ b/common/src/main/java/ctbrec/recorder/RemoteRecorder.java @@ -706,17 +706,21 @@ public class RemoteRecorder implements Recorder { @Override public void markForLaterRecording(Model model, boolean mark) throws InvalidKeyException, NoSuchAlgorithmException, IOException { + model.setMarkedForLaterRecording(mark); + LOG.info("Marking model {} {}", model, mark); if (mark) { sendRequest("markForLater", model); } else { sendRequest("unmarkForLater", model); } - model.setMarkedForLaterRecording(mark); - // update cached model + // update locally cached model int index = models.indexOf(model); if (index >= 0) { Model m = models.get(index); - m.setSuspended(mark); + m.setMarkedForLaterRecording(mark); + models.remove(index); + } else { + models.add(model); } } }