Version file 1

This commit is contained in:
Natsumi
2022-10-04 06:03:41 +13:00
parent 6d48ef001d
commit bc88792000
3 changed files with 8 additions and 8 deletions

View File

@@ -223,9 +223,9 @@ namespace VRCX
return CpuMonitor.Instance.CpuUsage;
}
public string GetImage(string url, string fileId, string version, string appVersion)
public string GetImage(string url, string fileId, string version)
{
return ImageCache.GetImage(url, fileId, version, appVersion);
return ImageCache.GetImage(url, fileId, version);
}
public void DesktopNotification(string BoldText, string Text, string Image)
@@ -295,11 +295,11 @@ namespace VRCX
broadcastSocket.SendTo(byteBuffer, endPoint);
}
public void DownloadVRCXUpdate(string url, string AppVersion)
public void DownloadVRCXUpdate(string url)
{
var Location = Path.Combine(Program.AppDataDirectory, "update.exe");
WebClient client = new WebClient();
client.Headers.Add("user-agent", AppVersion);
client.Headers.Add("user-agent", Program.Version);
client.DownloadFile(new Uri(url), Location);
}

View File

@@ -92,7 +92,7 @@ namespace VRCX
};
}
public void DownloadFile(string url, int size, string AppVersion)
public void DownloadFile(string url, int size)
{
DownloadProgress = 0;
DownloadSize = size;
@@ -100,7 +100,7 @@ namespace VRCX
DownloadTempLocation = Path.Combine(Program.AppDataDirectory, "tempDownload.exe");
DownloadDestinationLocation = Path.Combine(Program.AppDataDirectory, "update.exe");
client = new WebClient();
client.Headers.Add("user-agent", AppVersion);
client.Headers.Add("user-agent", Program.Version);
client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(DownloadProgressCallback);
client.DownloadFileCompleted += new AsyncCompletedEventHandler(DownloadCompletedCallback);
client.DownloadFileAsync(new System.Uri(url), DownloadTempLocation);

View File

@@ -9,7 +9,7 @@ namespace VRCX
{
private static readonly string cacheLocation = Path.Combine(Program.AppDataDirectory, "ImageCache");
public static string GetImage(string url, string fileId, string version, string appVersion)
public static string GetImage(string url, string fileId, string version)
{
var imageHost = "api.vrchat.cloud";
var imageHost1 = "files.vrchat.cloud";
@@ -42,7 +42,7 @@ namespace VRCX
}
client.Headers.Add(HttpRequestHeader.Cookie, cookieString);
client.Headers.Add("user-agent", appVersion);
client.Headers.Add("user-agent", Program.Version);
client.DownloadFile(url, fileLocation);
}