优化全局zap的打印,修复待机任务出现多个的情况

This commit is contained in:
2024-11-12 14:47:20 +08:00
parent 355880c3f9
commit cc12b60437
20 changed files with 181 additions and 84 deletions

View File

@@ -4,6 +4,7 @@ import (
"game-driver/internal/middleware"
"game-driver/internal/schema"
"game-driver/leaf"
"game-driver/pkg/logger"
"game-driver/pkg/utils"
"game-driver/pkg/video"
)
@@ -15,6 +16,11 @@ func OnlyVideo(c *leaf.Context) {
defer utils.BlankClose()
if url, ok := payload.Game["video"]; ok {
_ = video.Play(c, utils.LinkVideo(url.(string)))
local, err := utils.LinkVideo(url.(string))
if err != nil {
logger.Errorln("视频文件获取异常: ", err)
return
}
_ = video.Play(c, local)
}
}