snap.hutao

This commit is contained in:
HolographicHat
2022-09-27 16:58:46 +08:00
parent d84571ba1c
commit 9aaefe4cd7
7 changed files with 9 additions and 8 deletions

View File

@@ -30,7 +30,7 @@ public class CacheFile {
public void Write(byte[] data, string? etag = null) => Write(ByteString.CopyFrom(data), data.MD5Hash(), etag);
private void Write(ByteString data, string hash, string? etag = null) {
private void Write(ByteString data, string hash, string? etag) {
using var fOut = File.OpenWrite(_cacheName);
using var cOut = new GZipStream(fOut, CompressionLevel.SmallestSize);
new CacheItem {

View File

@@ -17,7 +17,7 @@ public static class Export {
}
if (!int.TryParse(Console.ReadLine(), out var num)) num = 0;
((Action<AchievementAllDataNotify>) (num switch {
1 => ToSnapGenshin,
1 => ToHuTao,
2 => ToPaimon,
3 => ToSeelie,
4 => ToCSV,
@@ -66,8 +66,9 @@ public static class Export {
Console.WriteLine(App.ExportToWxApp1Success, id);
}
private static void ToSnapGenshin(AchievementAllDataNotify data) {
private static void ToHuTao(AchievementAllDataNotify data) {
Utils.CopyToClipboard(JsonSerializer.Serialize(ExportToUIAFApp(data)));
Utils.ShellOpen("hutao://achievement/import");
Console.WriteLine(App.ExportToSnapGenshinSuccess);
}