From 7d9cc96ef54399795deb5b7fc7682e6323dc1202 Mon Sep 17 00:00:00 2001 From: 648540858 <456panlinlin> Date: 星期五, 25 三月 2022 16:05:14 +0800 Subject: [PATCH] 优化国标录像下载,添加进度条以及自动合并文件下载,需要结合新版assist服务使用。 --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaListManager.java | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaListManager.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaListManager.java index a4f7815..fa4aa35 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaListManager.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaListManager.java @@ -128,7 +128,7 @@ if (gbStreams.size() > 0) { for (GbStream gbStream : gbStreams) { // 鍑虹幇浣跨敤鐩稿悓鍥芥爣Id鐨勮棰戞祦鏃讹紝浣跨敤鏂版祦鏇挎崲鏃ф祦锛� - if (queryKey != null) { + if (queryKey != null && gbStream.getApp().equals(mediaItem.getApp())) { Matcher matcherForStream = pattern.matcher(gbStream.getStream()); String queryKeyForStream = null; if (matcherForStream.find()) { //姝ゅfind锛堬級姣忔琚皟鐢ㄥ悗锛屼細鍋忕Щ鍒颁笅涓�涓尮閰� @@ -144,12 +144,15 @@ } } } - StreamProxyItem streamProxyItem = gbStreamMapper.selectOne(transform.getApp(), transform.getStream()); - if (streamProxyItem != null) { - transform.setGbStreamId(streamProxyItem.getGbStreamId()); - transform.setPlatformId(streamProxyItem.getPlatformId()); - transform.setCatalogId(streamProxyItem.getCatalogId()); + // StreamProxyItem streamProxyItem = gbStreamMapper.selectOne(transform.getApp(), transform.getStream()); + List<GbStream> gbStreamList = gbStreamMapper.selectByGBId(transform.getGbId()); + if (gbStreamList != null && gbStreamList.size() == 1) { + transform.setGbStreamId(gbStreamList.get(0).getGbStreamId()); + transform.setPlatformId(gbStreamList.get(0).getPlatformId()); + transform.setCatalogId(gbStreamList.get(0).getCatalogId()); + transform.setGbId(gbStreamList.get(0).getGbId()); gbStreamMapper.update(transform); + streamPushMapper.del(gbStreamList.get(0).getApp(), gbStreamList.get(0).getStream()); }else { transform.setCreateStamp(System.currentTimeMillis()); gbStreamMapper.add(transform); -- Gitblit v1.8.0