load modpack info before modpack installer
This commit is contained in:
@@ -9,9 +9,14 @@ public class ModpackConfig
|
||||
public string UpdateUrl { get; set; }
|
||||
public string InstallUrl { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public string ConfigUrl { get; set; }
|
||||
|
||||
public static ModpackConfig LoadFromUrl(string url)
|
||||
{
|
||||
string result = new HttpClient().GetStringAsync(url).Result;
|
||||
return JsonConvert.DeserializeObject<ModpackConfig>(result);
|
||||
var config = JsonConvert.DeserializeObject<ModpackConfig>(result);
|
||||
config.ConfigUrl = url;
|
||||
return config;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user