From 7b3b249a7f2320f97e21e94e26a65f4b4ead0b6e Mon Sep 17 00:00:00 2001
From: shikeying <shikeying@163.com>
Date: 星期六, 24 九月 2022 16:50:25 +0800
Subject: [PATCH] 视频相似度分析1

---
 recommend-video/src/main/java/com/iplatform/recvideo/util/VideoFileUtils.java |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/recommend-video/src/main/java/com/iplatform/recvideo/util/VideoFileUtils.java b/recommend-video/src/main/java/com/iplatform/recvideo/util/VideoFileUtils.java
index 61b3707..21812ca 100644
--- a/recommend-video/src/main/java/com/iplatform/recvideo/util/VideoFileUtils.java
+++ b/recommend-video/src/main/java/com/iplatform/recvideo/util/VideoFileUtils.java
@@ -1,8 +1,8 @@
 package com.iplatform.recvideo.util;
 
 import com.iplatform.recvideo.Constants;
-import com.iplatform.recvideo.ImageInfo;
 import com.iplatform.recvideo.VideoFolderInfo;
+import com.walker.infrastructure.utils.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -14,8 +14,30 @@
 
     protected static final transient Logger logger = LoggerFactory.getLogger(VideoFileUtils.class);
 
+    /**
+     * 鎷兼帴瑙嗛鎵归噺(瀛樺偍)鏂囦欢澶硅矾寰勶紝濡�: /opt/ai/video/20220921锛屽叾涓�'20220921'涓烘壒閲忓彿
+     * @param videoDataFolder
+     * @param batchId
+     * @return
+     */
+    public static final String combineBatchPath(String videoDataFolder, String batchId){
+        String batchFolderPath = null;
+        if(videoDataFolder.endsWith(StringUtils.FOLDER_SEPARATOR)){
+            batchFolderPath = videoDataFolder + batchId;
+        } else {
+            batchFolderPath = videoDataFolder + StringUtils.FOLDER_SEPARATOR + batchId;
+        }
+        return batchFolderPath;
+    }
+
     public static final List<VideoFolderInfo> getBatchVideoFolderInfo(String videoDataFolder, String batchId){
-        String batchFolderPath = videoDataFolder + File.separator + batchId;
+//        String batchFolderPath = videoDataFolder + File.separator + batchId;
+        String batchFolderPath = combineBatchPath(videoDataFolder, batchId);
+//        if(videoDataFolder.endsWith(StringUtils.FOLDER_SEPARATOR)){
+//            batchFolderPath = videoDataFolder + batchId;
+//        } else {
+//            batchFolderPath = videoDataFolder + StringUtils.FOLDER_SEPARATOR + batchId;
+//        }
         File batchFolder = new File(batchFolderPath);
         if(!batchFolder.exists()){
             logger.error("瑙嗛鏂囦欢澶逛笉瀛樺湪锛屾棤娉曡幏鍙栧浘鐗囬泦鍚堜俊鎭�俠atchFolderPath = " + batchFolderPath);

--
Gitblit v1.9.1