Save Instance Prints To File

This commit is contained in:
Natsumi
2024-11-17 10:11:52 +13:00
parent 7956e19a10
commit 78a6dfbfe1
10 changed files with 223 additions and 82 deletions

View File

@@ -30,7 +30,6 @@ namespace VRCX
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
private static readonly MD5 _hasher = MD5.Create();
private static bool dialogOpen;
static AppApi()
{
@@ -575,5 +574,16 @@ namespace VRCX
return null;
}
public async Task<bool> SavePrintToFile(string url, string fileName)
{
var directory = Path.Combine(GetVRChatPhotosLocation(), "Prints");
Directory.CreateDirectory(directory);
var path = Path.Combine(directory, fileName);
if (File.Exists(path))
return false;
return await ImageCache.SaveImageToFile(url, path);
}
}
}