Skip to content

Conversation

EncVar
Copy link

@EncVar EncVar commented Jun 8, 2025

Closes #124

@EncVar EncVar requested a review from whitecat346 June 8, 2025 08:23
@whitecat346 whitecat346 added the 优化 对现有内容的优化与改进 label Jun 9, 2025
@EncVar EncVar requested a review from Hill23333 June 12, 2025 14:00
@EncVar EncVar marked this pull request as draft June 12, 2025 14:38
Copy link
Member

@whitecat346 whitecat346 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Donwnloader中

public Downloader Run()
{
    Task.Run(Manager);
    return this;
}

部分可以改为直接返回Task<Downloader>,这样就可以使用awaitContinueWith,减少使用Wait的阻塞等待
其余部分的Req-Reivew与Comment相同

Comment on lines +24 to +28
public static readonly MojangJavaVersion A = new("java-runtime-alpha");
public static readonly MojangJavaVersion Β = new("java-runtime-beta");
public static readonly MojangJavaVersion Δ = new("java-runtime-delta");
public static readonly MojangJavaVersion Γ = new("java-runtime-gamma");
public static readonly MojangJavaVersion Γs = new("java-runtime-gamma-snapshot");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修改为英文Alpla,Beta,Gamma,Delta
禁止使用非ASCII字符

}
catch (IOException e)
{
// TODO: handle this storage space is run out exception
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

完成TODO的内容(其余TODO的req-review相同)

Comment on lines +122 to +136
// ERROR: TODO: i cant understand this codes...
// await using var lzmaFs = await DownloadReceipt.FastDownloadAsStreamAsync(urlLzma,
// localFilePath + ".lzma", sha1Lzma, cancellationToken);
// await using var fs = lzmaFs.DecompressLzma(localFilePath);
// if (fs is null)
// {
// Console.WriteLine("outStream 为空");
// return;
// }
//
// if (!await new FileIntegrity { Hash = sha1Raw }.VerifyAsync(fs, cancellationToken))
// {
// Console.WriteLine("解压后的文件SHA-1与源提供的不匹配");
// return;
// }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对此处未更改部分更改为新的downloader

Comment on lines +151 to +153
// TODO: i cant understand this codes...

//ERROR: tasks.Add(DownloadReceipt.FastDownloadAsync(urlRaw, localFilePath, sha1Raw, cancellationToken));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对此处未更改部分改为新的downloader

Comment on lines +27 to +38
<ItemGroup>
<Compile Remove="Download\Minercraft\**" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Remove="Download\Minercraft\**" />
</ItemGroup>

<ItemGroup>
<None Remove="Download\Minercraft\**" />
</ItemGroup>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

移除此处的更改,未找到对应的文件和文件夹

@DotnetInstall DotnetInstall added this to the 0.1a milestone Jul 8, 2025
@whitecat346 whitecat346 marked this pull request as ready for review July 13, 2025 11:05
@whitecat346
Copy link
Member

Closed as no planned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
优化 对现有内容的优化与改进
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Downloader 重写
3 participants