fix Pre-Release Updates

pull/2556/head
2dust 2022-08-05 20:28:20 +08:00
parent 7a48617fea
commit 25b4ff771e
2 changed files with 39 additions and 38 deletions

View File

@ -398,7 +398,7 @@ namespace v2rayN.Handler
{ {
try try
{ {
var gitHubReleases = JsonConvert.DeserializeObject<List<GitHubRelease>>(gitHubReleaseApi); var gitHubReleases = Utils.FromJson<List<GitHubRelease>>(gitHubReleaseApi);
string version; string version;
if (preRelease) if (preRelease)
{ {

View File

@ -2,9 +2,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace v2rayN.Mode; namespace v2rayN.Mode
{
public class Asset public class GitHubReleaseAsset
{ {
[JsonProperty("url")] public string Url { get; set; } [JsonProperty("url")] public string Url { get; set; }
@ -59,7 +59,7 @@ public class GitHubRelease
[JsonProperty("published_at")] public DateTime PublishedAt { get; set; } [JsonProperty("published_at")] public DateTime PublishedAt { get; set; }
[JsonProperty("assets")] public List<Asset> Assets { get; set; } [JsonProperty("assets")] public List<GitHubReleaseAsset> Assets { get; set; }
[JsonProperty("tarball_url")] public string TarballUrl { get; set; } [JsonProperty("tarball_url")] public string TarballUrl { get; set; }
@ -67,3 +67,4 @@ public class GitHubRelease
[JsonProperty("body")] public string Body { get; set; } [JsonProperty("body")] public string Body { get; set; }
} }
}