From f7ac97c683a7a0c0e1f93672f19d536658d95d0c Mon Sep 17 00:00:00 2001 From: 0xboobface <0xboobface@gmail.com> Date: Sat, 11 May 2019 15:12:48 +0200 Subject: [PATCH] Implement interface changes --- .../sites/jasmin/LiveJasminChunkedHttpDownload.java | 11 ++++++----- .../sites/jasmin/LiveJasminWebSocketDownload.java | 13 ++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/common/src/main/java/ctbrec/sites/jasmin/LiveJasminChunkedHttpDownload.java b/common/src/main/java/ctbrec/sites/jasmin/LiveJasminChunkedHttpDownload.java index c8d47fcc..6dca1b99 100644 --- a/common/src/main/java/ctbrec/sites/jasmin/LiveJasminChunkedHttpDownload.java +++ b/common/src/main/java/ctbrec/sites/jasmin/LiveJasminChunkedHttpDownload.java @@ -16,6 +16,7 @@ import org.slf4j.LoggerFactory; import ctbrec.Config; import ctbrec.Model; +import ctbrec.Recording.State; import ctbrec.io.HttpClient; import ctbrec.recorder.download.Download; import okhttp3.Request; @@ -270,11 +271,6 @@ public class LiveJasminChunkedHttpDownload implements Download { isAlive = false; } - @Override - public boolean isAlive() { - return isAlive ; - } - @Override public File getTarget() { return targetFile; @@ -293,4 +289,9 @@ public class LiveJasminChunkedHttpDownload implements Download { @Override public void postprocess(File target) { } + + @Override + public State getState() { + return State.UNKNOWN; + } } diff --git a/common/src/main/java/ctbrec/sites/jasmin/LiveJasminWebSocketDownload.java b/common/src/main/java/ctbrec/sites/jasmin/LiveJasminWebSocketDownload.java index d11267f5..3ad4beeb 100644 --- a/common/src/main/java/ctbrec/sites/jasmin/LiveJasminWebSocketDownload.java +++ b/common/src/main/java/ctbrec/sites/jasmin/LiveJasminWebSocketDownload.java @@ -17,6 +17,7 @@ import com.google.common.eventbus.Subscribe; import ctbrec.Config; import ctbrec.Model; +import ctbrec.Recording.State; import ctbrec.event.Event; import ctbrec.event.EventBusHolder; import ctbrec.event.ModelStateChangedEvent; @@ -44,7 +45,6 @@ public class LiveJasminWebSocketDownload implements Download { private WebSocket stream; protected boolean connectionClosed; - private volatile boolean isAlive = true; private HttpClient client; private Model model; @@ -327,7 +327,6 @@ public class LiveJasminWebSocketDownload implements Download { public void stop() { connectionClosed = true; EventBusHolder.BUS.unregister(this); - isAlive = false; if (stream != null) { stream.close(1000, ""); } @@ -336,11 +335,6 @@ public class LiveJasminWebSocketDownload implements Download { } } - @Override - public boolean isAlive() { - return isAlive; - } - @Override public File getTarget() { return targetFile; @@ -359,4 +353,9 @@ public class LiveJasminWebSocketDownload implements Download { @Override public void postprocess(File target) { } + + @Override + public State getState() { + return State.UNKNOWN; + } }