fix HTTPS usage

This commit is contained in:
DismissedLight
2023-04-03 21:17:52 +08:00
parent 97f5904efa
commit 35e7aaef4e
4 changed files with 8 additions and 5 deletions

View File

@@ -1,6 +1,8 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
using System.Runtime.CompilerServices;
namespace Snap.Hutao.Core.Database;
/// <summary>
@@ -15,6 +17,7 @@ internal static class EnumerableExtension
/// <typeparam name="TSource">源类型</typeparam>
/// <param name="source">源</param>
/// <returns>选中的值或默认值</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static TSource? SelectedOrDefault<TSource>(this IEnumerable<TSource> source)
where TSource : ISelectable
{

View File

@@ -23,7 +23,7 @@ internal static class RegistryInterop
private static string PsExecutablePath
{
get => psExecutablePath ??= GetPowershellLocation();
get => psExecutablePath ??= GetPowerShellLocation();
}
/// <summary>
@@ -86,7 +86,7 @@ internal static class RegistryInterop
return null;
}
private static string GetPowershellLocation()
private static string GetPowerShellLocation()
{
string paths = Environment.GetEnvironmentVariable("Path")!;

View File

@@ -80,12 +80,12 @@ internal sealed partial class MetadataService : IMetadataService, IMetadataServi
}
ValueStopwatch stopwatch = ValueStopwatch.StartNew();
logger.LogInformation("Metadata initializaion begin");
logger.LogInformation("Metadata initialization begin");
isInitialized = await TryUpdateMetadataAsync(token).ConfigureAwait(false);
initializeCompletionSource.TrySetResult();
logger.LogInformation("Metadata initializaion completed in {time}ms", stopwatch.GetElapsedTime().TotalMilliseconds);
logger.LogInformation("Metadata initialization completed in {time}ms", stopwatch.GetElapsedTime().TotalMilliseconds);
}
private static string GetTextMapLocale()

View File

@@ -168,7 +168,7 @@ internal static class HutaoEndpoints
}
#endregion
private const string HutaoMetadataSnapGenshinApi = "http://hutao-metadata.snapgenshin.com";
private const string HutaoMetadataSnapGenshinApi = "https://hutao-metadata.snapgenshin.com";
private const string HomaSnapGenshinApi = "https://homa.snapgenshin.com";
private const string PatcherDGPStudioApi = "https://patcher.dgp-studio.cn";
private const string StaticSnapGenshinApi = "https://static.snapgenshin.com";