Skip to content

Commit

Permalink
v5.5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
trueai-org committed Aug 31, 2024
1 parent 81b516e commit f0e83f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions src/Midjourney.API/Controllers/SubmitController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public ActionResult<SubmitResultVO> Show([FromBody] SubmitShowDTO imagineDTO)
task.BotType = GetBotType(imagineDTO.BotType);
task.Description = $"/show {jobId}";
task.JobId = jobId;

NewTaskDoFilter(task, imagineDTO.AccountFilter);

var data = _taskService.ShowImagine(task);
Expand Down Expand Up @@ -390,7 +390,7 @@ public ActionResult<SubmitResultVO> Describe([FromBody] SubmitDescribeDTO descri

task.BotType = GetBotType(describeDTO.BotType);
task.Action = TaskAction.DESCRIBE;

string taskFileName = $"{task.Id}.{MimeTypeUtils.GuessFileSuffix(dataUrl.MimeType)}";
task.Description = $"/describe {taskFileName}";

Expand All @@ -411,7 +411,7 @@ public ActionResult<SubmitResultVO> Shorten([FromBody] SubmitImagineDTO dto)

task.BotType = GetBotType(dto.BotType);
task.Action = TaskAction.SHORTEN;

var prompt = dto.Prompt;
task.Prompt = prompt;

Expand Down Expand Up @@ -470,7 +470,7 @@ public ActionResult<SubmitResultVO> Blend([FromBody] SubmitBlendDTO blendDTO)
task.BotType = GetBotType(blendDTO.BotType);
task.Action = TaskAction.BLEND;
task.Description = $"/blend {task.Id} {dataUrlList.Count}";

NewTaskDoFilter(task, blendDTO.AccountFilter);

return Ok(_taskService.SubmitBlend(task, dataUrlList, blendDTO.Dimensions.Value));
Expand Down Expand Up @@ -784,6 +784,7 @@ private TaskInfo NewTask(BaseSubmitDTO baseDTO)
private void NewTaskDoFilter(TaskInfo task, AccountFilter accountFilter)
{
task.AccountFilter = accountFilter;
task.SetProperty(Constants.TASK_PROPERTY_BOT_TYPE, task.BotType.GetDescription());

if (_mode != null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Midjourney.Infrastructure/GlobalConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class GlobalConfiguration
/// <summary>
/// 版本号
/// </summary>
public static string Version { get; set; } = "v5.5.7";
public static string Version { get; set; } = "v5.5.8";

/// <summary>
/// 全局配置项
Expand Down
4 changes: 2 additions & 2 deletions src/Midjourney.Infrastructure/Services/TaskService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ public SubmitResultVO SubmitAction(TaskInfo task, SubmitActionDTO submitAction)
var messageId = targetTask.GetProperty<string>(Constants.TASK_PROPERTY_MESSAGE_ID, default);

task.BotType = targetTask.BotType;
task.SetProperty(Constants.TASK_PROPERTY_BOT_TYPE, targetTask.BotType);
task.SetProperty(Constants.TASK_PROPERTY_BOT_TYPE, targetTask.BotType.GetDescription());
task.SetProperty(Constants.TASK_PROPERTY_CUSTOM_ID, submitAction.CustomId);

// 设置任务的提示信息 = 父级任务的提示信息
Expand Down Expand Up @@ -540,7 +540,7 @@ public SubmitResultVO SubmitAction(TaskInfo task, SubmitActionDTO submitAction)
};

subTask.SetProperty(Constants.TASK_PROPERTY_DISCORD_INSTANCE_ID, discordInstance.ChannelId);
subTask.SetProperty(Constants.TASK_PROPERTY_BOT_TYPE, targetTask.BotType);
subTask.SetProperty(Constants.TASK_PROPERTY_BOT_TYPE, targetTask.BotType.GetDescription());

var nonce = SnowFlake.NextId();
subTask.Nonce = nonce;
Expand Down

0 comments on commit f0e83f7

Please sign in to comment.