mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
Version file 1
This commit is contained in:
@@ -223,9 +223,9 @@ namespace VRCX
|
|||||||
return CpuMonitor.Instance.CpuUsage;
|
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)
|
public void DesktopNotification(string BoldText, string Text, string Image)
|
||||||
@@ -295,11 +295,11 @@ namespace VRCX
|
|||||||
broadcastSocket.SendTo(byteBuffer, endPoint);
|
broadcastSocket.SendTo(byteBuffer, endPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DownloadVRCXUpdate(string url, string AppVersion)
|
public void DownloadVRCXUpdate(string url)
|
||||||
{
|
{
|
||||||
var Location = Path.Combine(Program.AppDataDirectory, "update.exe");
|
var Location = Path.Combine(Program.AppDataDirectory, "update.exe");
|
||||||
WebClient client = new WebClient();
|
WebClient client = new WebClient();
|
||||||
client.Headers.Add("user-agent", AppVersion);
|
client.Headers.Add("user-agent", Program.Version);
|
||||||
client.DownloadFile(new Uri(url), Location);
|
client.DownloadFile(new Uri(url), Location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ namespace VRCX
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DownloadFile(string url, int size, string AppVersion)
|
public void DownloadFile(string url, int size)
|
||||||
{
|
{
|
||||||
DownloadProgress = 0;
|
DownloadProgress = 0;
|
||||||
DownloadSize = size;
|
DownloadSize = size;
|
||||||
@@ -100,7 +100,7 @@ namespace VRCX
|
|||||||
DownloadTempLocation = Path.Combine(Program.AppDataDirectory, "tempDownload.exe");
|
DownloadTempLocation = Path.Combine(Program.AppDataDirectory, "tempDownload.exe");
|
||||||
DownloadDestinationLocation = Path.Combine(Program.AppDataDirectory, "update.exe");
|
DownloadDestinationLocation = Path.Combine(Program.AppDataDirectory, "update.exe");
|
||||||
client = new WebClient();
|
client = new WebClient();
|
||||||
client.Headers.Add("user-agent", AppVersion);
|
client.Headers.Add("user-agent", Program.Version);
|
||||||
client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(DownloadProgressCallback);
|
client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(DownloadProgressCallback);
|
||||||
client.DownloadFileCompleted += new AsyncCompletedEventHandler(DownloadCompletedCallback);
|
client.DownloadFileCompleted += new AsyncCompletedEventHandler(DownloadCompletedCallback);
|
||||||
client.DownloadFileAsync(new System.Uri(url), DownloadTempLocation);
|
client.DownloadFileAsync(new System.Uri(url), DownloadTempLocation);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace VRCX
|
|||||||
{
|
{
|
||||||
private static readonly string cacheLocation = Path.Combine(Program.AppDataDirectory, "ImageCache");
|
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 imageHost = "api.vrchat.cloud";
|
||||||
var imageHost1 = "files.vrchat.cloud";
|
var imageHost1 = "files.vrchat.cloud";
|
||||||
@@ -42,7 +42,7 @@ namespace VRCX
|
|||||||
}
|
}
|
||||||
|
|
||||||
client.Headers.Add(HttpRequestHeader.Cookie, cookieString);
|
client.Headers.Add(HttpRequestHeader.Cookie, cookieString);
|
||||||
client.Headers.Add("user-agent", appVersion);
|
client.Headers.Add("user-agent", Program.Version);
|
||||||
client.DownloadFile(url, fileLocation);
|
client.DownloadFile(url, fileLocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user