Skip to content

Commit bbd972a

Browse files
committed
fix: upscaler, index, bug, feat: request mode
1 parent e5b3c19 commit bbd972a

File tree

5 files changed

+513
-56
lines changed

5 files changed

+513
-56
lines changed

src/Midjourney.API/Midjourney.API.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
1010
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
1111
<SatelliteResourceLanguages>zh-Hans</SatelliteResourceLanguages>
12-
<AssemblyVersion>8.7.1</AssemblyVersion>
12+
<AssemblyVersion>8.7.2</AssemblyVersion>
1313
<DockerfileContext>..\..</DockerfileContext>
1414
</PropertyGroup>
1515

src/Midjourney.Base/DiscordHelper.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,16 @@ public string GetMessageHash(string imageUrl)
205205
}
206206
return imageUrl.Substring(hashStartIndex + 1, imageUrl.Length - hashStartIndex - 1 - "_0_0.png".Length);
207207
}
208+
// https://cdn.midjourney.com/a7b52e11-a59b-4f8e-ac2d-d9be4993a537/0_0.png
209+
else if (imageUrl.EndsWith("/0_0.png"))
210+
{
211+
int hashStartIndex = imageUrl.LastIndexOf("/");
212+
if (hashStartIndex < 0)
213+
{
214+
return null;
215+
}
216+
return imageUrl.Substring(hashStartIndex + 1, imageUrl.Length - hashStartIndex - 1 - "/0_0.png".Length);
217+
}
208218
// e7321c76-becf-473b-b14d-32b846dc70ad_0.mp4
209219
else if (imageUrl.EndsWith("_0.mp4"))
210220
{

0 commit comments

Comments
 (0)