Small changes

This commit is contained in:
Natsumi
2022-04-06 06:32:56 +12:00
parent 67b78b064d
commit 5a12956b9d
4 changed files with 27 additions and 17 deletions

View File

@@ -13,6 +13,7 @@ namespace VRCX
{
var imageHost = "api.vrchat.cloud";
var imageHost1 = "files.vrchat.cloud";
var imageHost2 = "d348imysud55la.cloudfront.net";
var directoryLocation = Path.Combine(cacheLocation, fileId);
var fileLocation = Path.Combine(directoryLocation, $"{version}.png");
@@ -27,7 +28,7 @@ namespace VRCX
Directory.CreateDirectory(directoryLocation);
Uri uri = new Uri(url);
if (uri.Host != imageHost && uri.Host != imageHost1)
if (uri.Host != imageHost && uri.Host != imageHost1 && uri.Host != imageHost2)
throw new ArgumentException("Invalid image host", url);
using (var client = new WebClient())