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