mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-30 04:00:50 +01:00
fix that
This commit is contained in:
parent
2512678eb4
commit
3e08a50211
@ -198,6 +198,14 @@
|
|||||||
<artifactId>jetty-http</artifactId>
|
<artifactId>jetty-http</artifactId>
|
||||||
<version>${jettyVersion}</version>
|
<version>${jettyVersion}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-io</groupId>
|
||||||
|
<artifactId>commons-io</artifactId>
|
||||||
|
<version>2.10.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,12 +16,12 @@ import javafx.scene.layout.FlowPane;
|
|||||||
import javafx.scene.layout.Region;
|
import javafx.scene.layout.Region;
|
||||||
import javafx.scene.web.WebView;
|
import javafx.scene.web.WebView;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import org.jsoup.Jsoup;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashSet;
|
import java.net.URL;
|
||||||
import java.util.Set;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
// run as root issue Invalid MIT-MAGIC-COOKIE-1 key fix: https://stackoverflow.com/questions/48139447/invalid-mit-magic-cookie-1-key
|
// run as root issue Invalid MIT-MAGIC-COOKIE-1 key fix: https://stackoverflow.com/questions/48139447/invalid-mit-magic-cookie-1-key
|
||||||
|
|
||||||
@ -71,9 +71,9 @@ public class Main extends Application {
|
|||||||
|
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
String s = Jsoup.connect(gitApi).ignoreContentType(true).get().body().toString();
|
JSONObject object = new JSONObject(IOUtils.toString(
|
||||||
s = s.substring(6, s.length() - 7);
|
new URL(gitApi).openStream(), StandardCharsets.UTF_8));
|
||||||
JSONObject object = new JSONObject(s);
|
|
||||||
String gitv = (String)object.get("tag_name");
|
String gitv = (String)object.get("tag_name");
|
||||||
if (!gitv.equals(version)) {
|
if (!gitv.equals(version)) {
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user