fix: 删除重复的SaveVideoSourceAsset调用,解决改名时先创建后更新的bug

This commit is contained in:
tian 2026-07-26 12:53:13 +08:00
parent 873cc3e1a4
commit 210465cc71
2 changed files with 0 additions and 10 deletions

View File

@ -3744,16 +3744,6 @@ func (u *UI) actionAssetVideoSourceSave(w http.ResponseWriter, r *http.Request)
MountAngle: strings.TrimSpace(r.FormValue("mount_angle")),
},
}
if err := u.preview.SaveVideoSourceAsset(asset, ""); err != nil {
data := u.assetPageData("video-sources")
data.Title = "资产管理"
data.Error = err.Error()
data.AssetVideoSource = &asset
data.AssetVideoSource.SourceTypeLabel = serviceVideoSourceTypeLabel(asset.SourceType)
data.AssetVideoSourceEditing = true
u.render(w, r, "assets", data)
return
}
// Pass ID for update (0 = new)
if idStr := strings.TrimSpace(r.FormValue("id")); idStr != "" {
if id, err := strconv.Atoi(idStr); err == nil {

Binary file not shown.