|
|
@@ -102,7 +102,17 @@ namespace TBMM |
|
|
|
string repoURL = "/api/v1/repos/" + mod.Author + "/" + mod.Name + "/releases"; |
|
|
|
using (var client = GetClient()) |
|
|
|
{ |
|
|
|
var arr = JArray.Parse(await client.DownloadStringTaskAsync(repoURL)); |
|
|
|
string str; |
|
|
|
try |
|
|
|
{ |
|
|
|
str = await client.DownloadStringTaskAsync(repoURL); |
|
|
|
} |
|
|
|
catch (WebException) |
|
|
|
{ |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
var arr = JArray.Parse(str); |
|
|
|
var release = arr.FirstOrDefault(rel => |
|
|
|
{ |
|
|
|
if ((bool) rel["prerelease"] || (bool) rel["draft"]) |
|
|
|