aboutsummaryrefslogtreecommitdiff
path: root/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2021-06-15 18:43:25 -0600
committerBryson Steck <steck.bryson@gmail.com>2021-06-15 18:43:25 -0600
commit8db9ccdf642ed81f585e900a843c411b973ce6da (patch)
tree54cac94efc109ec47a0111605dbbaae8c9d24fd0 /src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java
parent7d5f60d921cd35ce82a24e75ebfd79a3fd64bfed (diff)
downloadresurrection-8db9ccdf642ed81f585e900a843c411b973ce6da.tar
resurrection-8db9ccdf642ed81f585e900a843c411b973ce6da.tar.gz
resurrection-8db9ccdf642ed81f585e900a843c411b973ce6da.tar.bz2
starting to test timer
Diffstat (limited to 'src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java')
-rw-r--r--src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java b/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java
index 1507480..be30844 100644
--- a/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java
+++ b/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java
@@ -20,8 +20,11 @@ public class CheckForUpdate {
String json = urlReader();
JsonElement root = new JsonParser().parse(json);
JsonObject rootobj = root.getAsJsonObject();
- version = rootobj.get("current-version").getAsString();
- versionURL = rootobj.get("release-url").getAsString();
+ JsonElement softwareElement = rootobj.get("resurrection");
+ JsonObject softwareObj = softwareElement.getAsJsonObject();
+ version = softwareObj.get("current-release").toString();
+// version = rootobj.get("current-version").getAsString();
+// versionURL = rootobj.get("release-url").getAsString();
} catch (IOException e) {
System.out.println("[Resurrection] An error has occurred while attempting to check for updates.");
e.printStackTrace();
@@ -29,7 +32,7 @@ public class CheckForUpdate {
}
public String urlReader() throws IOException {
- URL website = new URL("https://brysonsteck.net/resurrect.json");
+ URL website = new URL("https://brysonsteck.net/updates.json");
URLConnection connection = website.openConnection();
BufferedReader in = new BufferedReader(
new InputStreamReader(