|
@@ -976,7 +976,7 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
|
|
|
// 从原数组中删除
|
|
// 从原数组中删除
|
|
itemModels[currItemModelIndex].titleStickers.removeAll { m in
|
|
itemModels[currItemModelIndex].titleStickers.removeAll { m in
|
|
- let su = (m.audioFilePath == voiceModel.wavFilePath)
|
|
|
|
|
|
+ let su = (m.taskID == voiceModel.titleTaskId)
|
|
if su {
|
|
if su {
|
|
deleteTemp.append(m)
|
|
deleteTemp.append(m)
|
|
}
|
|
}
|
|
@@ -1015,7 +1015,7 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
item.endCMTime = item.endCMTime - currDuration
|
|
item.endCMTime = item.endCMTime - currDuration
|
|
|
|
|
|
let titlsList = itemModels[currItemModelIndex].titleStickers.filter({ tm in
|
|
let titlsList = itemModels[currItemModelIndex].titleStickers.filter({ tm in
|
|
- tm.audioFilePath == item.wavFilePath
|
|
|
|
|
|
+ tm.taskID == item.titleTaskId
|
|
})
|
|
})
|
|
|
|
|
|
for titleM in titlsList {
|
|
for titleM in titlsList {
|
|
@@ -1164,7 +1164,7 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
BFLog(2, message: "删除\(voiceModel?.wavFilePath ?? "")对应的字幕 前 count\(subtitleCount)")
|
|
BFLog(2, message: "删除\(voiceModel?.wavFilePath ?? "")对应的字幕 前 count\(subtitleCount)")
|
|
if subtitleCount > 0 {
|
|
if subtitleCount > 0 {
|
|
for title in itemModels[currItemModelIndex].titleStickers {
|
|
for title in itemModels[currItemModelIndex].titleStickers {
|
|
- if title.audioFilePath == voiceModel?.wavFilePath ?? "" {
|
|
|
|
|
|
+ if title.taskID == voiceModel?.titleTaskId ?? "none" {
|
|
if let index = itemModels[currItemModelIndex].titleStickers.firstIndex(of: title) {
|
|
if let index = itemModels[currItemModelIndex].titleStickers.firstIndex(of: title) {
|
|
itemModels[currItemModelIndex].titleStickers.remove(at: index)
|
|
itemModels[currItemModelIndex].titleStickers.remove(at: index)
|
|
}
|
|
}
|
|
@@ -2073,6 +2073,7 @@ extension BFRecordScreenController: UICollectionViewDelegate, UICollectionViewDa
|
|
if isRecording {
|
|
if isRecording {
|
|
endRecord()
|
|
endRecord()
|
|
}
|
|
}
|
|
|
|
+ recorderManager?.cancelTitleService()
|
|
// events.append(WithDrawModel(type: 0, timestamp: currentAssetProgress.seconds))
|
|
// events.append(WithDrawModel(type: 0, timestamp: currentAssetProgress.seconds))
|
|
// // 重设撤销栈
|
|
// // 重设撤销栈
|
|
// itemModels[currItemModelIndex].events = events
|
|
// itemModels[currItemModelIndex].events = events
|