diff --git a/common/src/main/java/ctbrec/recorder/NextGenLocalRecorder.java b/common/src/main/java/ctbrec/recorder/NextGenLocalRecorder.java index 15e6d71a..f74dd9ea 100644 --- a/common/src/main/java/ctbrec/recorder/NextGenLocalRecorder.java +++ b/common/src/main/java/ctbrec/recorder/NextGenLocalRecorder.java @@ -119,12 +119,9 @@ public class NextGenLocalRecorder implements Recorder { Model model = recording.getModel(); tryRestartRecording(model); } else { - if(recording.getStatus() != State.DELETED) { - delete(recording); - } setRecordingStatus(recording, State.FAILED); } - } catch (InterruptedException | ExecutionException | InvalidKeyException | NoSuchAlgorithmException | IllegalStateException | IOException e) { + } catch (InterruptedException | ExecutionException | IllegalStateException e) { LOG.error("Error while completing recording", e); } } @@ -257,12 +254,12 @@ public class NextGenLocalRecorder implements Recorder { setRecordingStatus(rec, State.RECORDING); recordingManager.saveRecording(rec); download.start(); - boolean deleted = deleteIfEmpty(rec); - setRecordingStatus(rec, deleted ? State.DELETED : State.WAITING); - recordingManager.saveRecording(rec); } catch (IOException e) { LOG.error("Download for {} failed. Download state: {}", model.getName(), rec.getStatus(), e); } + boolean deleted = deleteIfEmpty(rec); + setRecordingStatus(rec, deleted ? State.DELETED : State.WAITING); + recordingManager.saveRecording(rec); return rec; }); } finally {