Merge remote-tracking branch 'nyx/20251103-1282-fix-gj' into release-20250328-master

# Conflicts:
#	servers/boe-server-all/src/main/java/com/xboe/module/course/api/CourseFileApi.java
This commit is contained in:
joshen
2025-11-04 16:58:24 +08:00

View File

@@ -15,6 +15,8 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import it.sauronsoftware.jave.Encoder;
import it.sauronsoftware.jave.MultimediaInfo;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.orm.ObjectOptimisticLockingFailureException; import org.springframework.orm.ObjectOptimisticLockingFailureException;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@@ -46,8 +48,6 @@ import com.xboe.module.scorm.SCORMParser;
import com.xboe.standard.BaseConstant; import com.xboe.standard.BaseConstant;
import com.xboe.standard.enums.BoedxCourseFileType; import com.xboe.standard.enums.BoedxCourseFileType;
import it.sauronsoftware.jave.Encoder;
import it.sauronsoftware.jave.MultimediaInfo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
/** /**
@@ -256,7 +256,7 @@ public class CourseFileApi extends ApiBaseController {
} }
String fileFullPath = SysConstant.getConfigValue(BaseConstant.CONFIG_UPLOAD_FILES_SAVEPATH) + file.getFilePath(); String fileFullPath = SysConstant.getConfigValue(BaseConstant.CONFIG_UPLOAD_FILES_SAVEPATH) + file.getFilePath();
if ("mp3,mp4".indexOf(file.getFileType()) > -1){ if ("mp3,mp4".indexOf(file.getFileType()) > -1){
log.info("上传 "+file.getFileType()+"文件:"+file.getFilePath()); log.info("上传 "+file.getFileType()+"文件:"+file.getFilePath());
Encoder encoder = new Encoder(); Encoder encoder = new Encoder();
try { try {
//System.out.println(fileFullPath); //System.out.println(fileFullPath);
@@ -279,7 +279,7 @@ public class CourseFileApi extends ApiBaseController {
} }
} catch (Exception e) { } catch (Exception e) {
log.error("读取视频时长错误", e); log.error("读取视频时长错误", e);
// e.printStackTrace(); return error("视频解析失败,尝试重新上传或联系管理员", "视频解析失败,尝试重新上传或联系管理员");
} }
} }