fix stream copy work totalbytes

This commit is contained in:
DismissedLight
2023-12-04 21:35:43 +08:00
parent b6769b63e3
commit b6ad96c0cb
4 changed files with 2 additions and 4 deletions

View File

@@ -54,7 +54,7 @@ internal static class DependencyInjection
CultureInfo.CurrentCulture = cultureInfo;
CultureInfo.CurrentUICulture = cultureInfo;
CultureInfo.DefaultThreadCurrentCulture = cultureInfo;
CultureInfo.DefaultThreadCurrentUICulture = cultureInfo;

View File

@@ -66,7 +66,6 @@ internal static partial class IocHttpClientConfiguration
client.DefaultRequestHeaders.Add("x-rpc-device_name", string.Empty);
client.DefaultRequestHeaders.Add("x-rpc-game_biz", "bbs_cn");
client.DefaultRequestHeaders.Add("x-rpc-sdk_version", "2.16.0");
//client.DefaultRequestHeaders.Add("x-rpc-tool_verison", "v4.2.2-ys");
}
/// <summary>

View File

@@ -9,7 +9,7 @@ namespace Snap.Hutao.Core.IO;
internal sealed class StreamCopyWorker : StreamCopyWorker<StreamCopyStatus>
{
public StreamCopyWorker(Stream source, Stream destination, long totalBytes, int bufferSize = 81920)
: base(source, destination, totalBytes => new StreamCopyStatus(totalBytes, totalBytes), bufferSize)
: base(source, destination, bytes => new StreamCopyStatus(bytes, totalBytes), bufferSize)
{
}
}

View File

@@ -13,7 +13,6 @@ using System.IO;
using System.Net;
using System.Net.Http;
using System.Net.Http.Json;
using Windows.ApplicationModel.Appointments;
namespace Snap.Hutao.Service.Metadata;