diff --git a/Web/html/body/user.html b/Web/html/body/user.html index 28f28d4..6f3d32d 100644 --- a/Web/html/body/user.html +++ b/Web/html/body/user.html @@ -11,7 +11,7 @@
-
+
diff --git a/pom.xml b/pom.xml index 62cfeda..07dbc96 100644 --- a/pom.xml +++ b/pom.xml @@ -124,6 +124,25 @@ + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + test + + run + + + + 复制正式文件 + + + + + + org.jetbrains.kotlin kotlin-maven-plugin diff --git a/src/main/java/com/yutou/bilibili/BiliBili/Live.java b/src/main/java/com/yutou/bilibili/BiliBili/Live.java index 4e2f8ac..9a81b2b 100644 --- a/src/main/java/com/yutou/bilibili/BiliBili/Live.java +++ b/src/main/java/com/yutou/bilibili/BiliBili/Live.java @@ -133,7 +133,7 @@ public class Live implements ApplicationContextAware { private void start() throws Exception { run = true; if (LiveUtils.isLivePlayer(roomId)) { - upData.setLive(1); + upData.setLive(-1); } String url = LiveUtils.getLiveUrl(roomId); if (url == null) { @@ -227,14 +227,6 @@ public class Live implements ApplicationContextAware { } }; client.connect(); - new Timer().schedule(new TimerTask() { - @Override - public void run() { - if (client == null || client.isClosed()) { - stop(); - } - } - }, 0, 60 * 1000); } public void stop() { @@ -290,6 +282,7 @@ public class Live implements ApplicationContextAware { outputStream.flush(); // LiveUtils.printHex(outputStream.toByteArray()); client.send(outputStream.toByteArray()); + checkLive(); } /** @@ -306,11 +299,11 @@ public class Live implements ApplicationContextAware { if (data.length > 32) { List list = LiveUtils.getMsgList(LiveUtils.dec(bytes), new ArrayList<>(), true); String tmp = ""; - for (int i = 0; i < list.size(); i++) { + for (int i=0;i