wanghongbo

增加直播拆条提交到素材库封面图抽帧

@@ -445,6 +445,14 @@ public class BackupMaterialServiceImpl extends ServiceImpl<BackupMaterialMapper, @@ -445,6 +445,14 @@ public class BackupMaterialServiceImpl extends ServiceImpl<BackupMaterialMapper,
445 //封面图 445 //封面图
446 if(StringUtils.isNotEmpty(materialSubmitVo.getCoverPath())){ 446 if(StringUtils.isNotEmpty(materialSubmitVo.getCoverPath())){
447 backupMaterial.setCoverPath(materialSubmitVo.getCoverPath().replace(realPath, "")); 447 backupMaterial.setCoverPath(materialSubmitVo.getCoverPath().replace(realPath, ""));
  448 + }else{
  449 + //直播拆条没有封面图时,使用抽帧取封面图
  450 + String coverPath = destFilePath.substring(0, destFilePath.lastIndexOf(".")) + ".jpg";
  451 + if(extracted(destFilePath, coverPath)){
  452 + backupMaterial.setCoverPath(coverPath.replace(realPath, ""));
  453 + }else{
  454 + backupMaterial.setCoverPath("");
  455 + }
448 } 456 }
449 //时长 457 //时长
450 backupMaterial.setDuration(materialSubmitVo.getDuration()); 458 backupMaterial.setDuration(materialSubmitVo.getDuration());