mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-26 02:03:49 +02:00
Save Instance Prints To File
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user