mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-17 16:56:38 +08:00
fixed bug for luma api response data parse error
This commit is contained in:
parent
6e7aecc568
commit
dc7c049a7b
@ -1,4 +1,9 @@
|
|||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
|
## v4.1.8
|
||||||
|
|
||||||
|
* Bug修复:修复音 Luma API 更新导致任务响应解析失败的错误
|
||||||
|
|
||||||
## v4.1.7
|
## v4.1.7
|
||||||
* Bug修复:手机邮箱相关的注册问题 [#IB0HS5](https://gitee.com/blackfox/geekai/issues/IB0HS5)
|
* Bug修复:手机邮箱相关的注册问题 [#IB0HS5](https://gitee.com/blackfox/geekai/issues/IB0HS5)
|
||||||
* Bug修复:音乐视频无法下载,思维导图下载后看不清文字[#IB0N2E](https://gitee.com/blackfox/geekai/issues/IB0N2E)
|
* Bug修复:音乐视频无法下载,思维导图下载后看不清文字[#IB0N2E](https://gitee.com/blackfox/geekai/issues/IB0N2E)
|
||||||
|
@ -130,10 +130,13 @@ type LumaRespVo struct {
|
|||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
Prompt string `json:"prompt"`
|
Prompt string `json:"prompt"`
|
||||||
State string `json:"state"`
|
State string `json:"state"`
|
||||||
CreatedAt time.Time `json:"created_at"`
|
QueueState interface{} `json:"queue_state"`
|
||||||
|
CreatedAt string `json:"created_at"`
|
||||||
Video interface{} `json:"video"`
|
Video interface{} `json:"video"`
|
||||||
|
VideoRaw interface{} `json:"video_raw"`
|
||||||
Liked interface{} `json:"liked"`
|
Liked interface{} `json:"liked"`
|
||||||
EstimateWaitSeconds interface{} `json:"estimate_wait_seconds"`
|
EstimateWaitSeconds interface{} `json:"estimate_wait_seconds"`
|
||||||
|
Thumbnail interface{} `json:"thumbnail"`
|
||||||
Channel string `json:"channel,omitempty"`
|
Channel string `json:"channel,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -234,7 +237,7 @@ func (s *Service) DownloadFiles() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.Info("download no water video success: %s", videoURL)
|
logger.Infof("download no water video success: %s", videoURL)
|
||||||
v.VideoURL = videoURL
|
v.VideoURL = videoURL
|
||||||
v.Progress = 100
|
v.Progress = 100
|
||||||
s.db.Updates(&v)
|
s.db.Updates(&v)
|
||||||
@ -275,6 +278,7 @@ func (s *Service) SyncTaskProgress() {
|
|||||||
"water_url": task.Video.Url,
|
"water_url": task.Video.Url,
|
||||||
"raw_data": utils.JsonEncode(task),
|
"raw_data": utils.JsonEncode(task),
|
||||||
"prompt_ext": task.Prompt,
|
"prompt_ext": task.Prompt,
|
||||||
|
"cover_url": task.Thumbnail.Url,
|
||||||
}
|
}
|
||||||
if task.Video.DownloadUrl != "" {
|
if task.Video.DownloadUrl != "" {
|
||||||
data["video_url"] = task.Video.DownloadUrl
|
data["video_url"] = task.Video.DownloadUrl
|
||||||
@ -315,11 +319,28 @@ type LumaTaskVo struct {
|
|||||||
Url string `json:"url"`
|
Url string `json:"url"`
|
||||||
Width int `json:"width"`
|
Width int `json:"width"`
|
||||||
Height int `json:"height"`
|
Height int `json:"height"`
|
||||||
|
Thumbnail string `json:"thumbnail"`
|
||||||
DownloadUrl string `json:"download_url"`
|
DownloadUrl string `json:"download_url"`
|
||||||
} `json:"video"`
|
} `json:"video"`
|
||||||
Prompt string `json:"prompt"`
|
Prompt string `json:"prompt"`
|
||||||
CreatedAt time.Time `json:"created_at"`
|
UserId string `json:"user_id"`
|
||||||
EstimateWaitSeconds interface{} `json:"estimate_wait_seconds"`
|
BatchId string `json:"batch_id"`
|
||||||
|
Thumbnail struct {
|
||||||
|
Url string `json:"url"`
|
||||||
|
Width int `json:"width"`
|
||||||
|
Height int `json:"height"`
|
||||||
|
} `json:"thumbnail"`
|
||||||
|
VideoRaw struct {
|
||||||
|
Url string `json:"url"`
|
||||||
|
Width int `json:"width"`
|
||||||
|
Height int `json:"height"`
|
||||||
|
} `json:"video_raw"`
|
||||||
|
CreatedAt string `json:"created_at"`
|
||||||
|
LastFrame struct {
|
||||||
|
Url string `json:"url"`
|
||||||
|
Width int `json:"width"`
|
||||||
|
Height int `json:"height"`
|
||||||
|
} `json:"last_frame"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Service) QueryLumaTask(taskId string, channel string) (LumaTaskVo, error) {
|
func (s *Service) QueryLumaTask(taskId string, channel string) (LumaTaskVo, error) {
|
||||||
|
8
database/update-v4.1.8.sql
Normal file
8
database/update-v4.1.8.sql
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
ALTER TABLE `chatgpt_suno_jobs` CHANGE `err_msg` `err_msg` VARCHAR(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '错误信息';
|
||||||
|
|
||||||
|
ALTER TABLE `chatgpt_sd_jobs` CHANGE `err_msg` `err_msg` VARCHAR(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '错误信息';
|
||||||
|
|
||||||
|
ALTER TABLE `chatgpt_mj_jobs` CHANGE `err_msg` `err_msg` VARCHAR(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '错误信息';
|
||||||
|
|
||||||
|
ALTER TABLE `chatgpt_dall_jobs` CHANGE `err_msg` `err_msg` VARCHAR(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '错误信息';
|
||||||
|
ALTER TABLE `chatgpt_video_jobs` CHANGE `err_msg` `err_msg` VARCHAR(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '错误信息';
|
Loading…
Reference in New Issue
Block a user