From 7395e900136c23597e987c1ada4ebc25bc8f94d2 Mon Sep 17 00:00:00 2001 From: creamlike1024 Date: Fri, 5 Dec 2025 12:06:08 +0800 Subject: [PATCH] feat: use origin task size and seconds --- relay/relay_task.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/relay/relay_task.go b/relay/relay_task.go index ff4c73cfe..13d5e83bd 100644 --- a/relay/relay_task.go +++ b/relay/relay_task.go @@ -92,6 +92,25 @@ func RelayTaskSubmit(c *gin.Context, info *relaycommon.RelayInfo) (taskErr *dto. platform = originTask.Platform } + // 使用原始任务的参数 + if info.Action == "remix" { + var taskData map[string]interface{} + _ = json.Unmarshal(originTask.Data, &taskData) + secondsStr, _ := taskData["seconds"].(string) + seconds, _ := strconv.Atoi(secondsStr) + if seconds <= 0 { + seconds = 4 + } + sizeStr, _ := taskData["size"].(string) + if info.PriceData.OtherRatios == nil { + info.PriceData.OtherRatios = map[string]float64{} + } + info.PriceData.OtherRatios["seconds"] = float64(seconds) + info.PriceData.OtherRatios["size"] = 1 + if sizeStr == "1792x1024" || sizeStr == "1024x1792" { + info.PriceData.OtherRatios["size"] = 1.666667 + } + } } if platform == "" { platform = GetTaskPlatform(c)