优化快照的存储与显示
This commit is contained in:
@@ -91,10 +91,9 @@ public class ZLMHttpHookListener {
|
||||
public ResponseEntity<String> onServerKeepalive(@RequestBody JSONObject json){
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("[ ZLM HOOK ]on_server_keepalive API调用,参数:" + json.toString());
|
||||
logger.debug("[ ZLM HOOK ] on_server_keepalive API调用,参数:" + json.toString());
|
||||
}
|
||||
String mediaServerId = json.getString("mediaServerId");
|
||||
|
||||
List<ZLMHttpHookSubscribe.Event> subscribes = this.subscribe.getSubscribes(ZLMHttpHookSubscribe.HookType.on_server_keepalive);
|
||||
if (subscribes != null && subscribes.size() > 0) {
|
||||
for (ZLMHttpHookSubscribe.Event subscribe : subscribes) {
|
||||
@@ -164,7 +163,6 @@ public class ZLMHttpHookListener {
|
||||
if (mediaInfo != null) {
|
||||
subscribe.response(mediaInfo, json);
|
||||
}
|
||||
|
||||
}
|
||||
JSONObject ret = new JSONObject();
|
||||
ret.put("code", 0);
|
||||
|
||||
@@ -151,7 +151,7 @@ public class ZLMRESTfulUtils {
|
||||
}
|
||||
|
||||
}
|
||||
File snapFile = new File(targetPath + "/" + fileName);
|
||||
File snapFile = new File(targetPath + File.separator + fileName);
|
||||
FileOutputStream outStream = new FileOutputStream(snapFile);
|
||||
|
||||
outStream.write(Objects.requireNonNull(response.body()).bytes());
|
||||
|
||||
Reference in New Issue
Block a user