update
This commit is contained in:
parent
7214751dd7
commit
680b7ff8b9
@ -174,8 +174,6 @@ public class SaveLive {
|
||||
}
|
||||
|
||||
private void httpDownload(String url) throws Exception {
|
||||
com.yutou.bilibili.Tools.Log.i("开始录制:" + roomId);
|
||||
QQBotManager.getInstance().sendMessage(roomId + " 已启动录制");
|
||||
HttpURLConnection connection = LiveUtils.getBiliHttpGet(url, LiveUtils.getCookie());
|
||||
connection.setReadTimeout(5000);
|
||||
connection.setConnectTimeout(5000);
|
||||
@ -195,12 +193,18 @@ public class SaveLive {
|
||||
liveFile.mkdirs();
|
||||
liveFile.delete();
|
||||
}
|
||||
boolean isPrint=false;
|
||||
FileOutputStream outputStream = new FileOutputStream(liveFile);
|
||||
int len;
|
||||
byte[] bytes = new byte[1024];
|
||||
while ((len = inputStream.read(bytes)) != -1 && isSave) {
|
||||
outputStream.write(bytes, 0, len);
|
||||
outputStream.flush();
|
||||
if(!isPrint){
|
||||
com.yutou.bilibili.Tools.Log.i("开始录制:" + roomId);
|
||||
QQBotManager.getInstance().sendMessage(roomId + " 已启动录制");
|
||||
isPrint=true;
|
||||
}
|
||||
}
|
||||
outputStream.close();
|
||||
inputStream.close();
|
||||
|
Loading…
Reference in New Issue
Block a user