mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-23 01:27:37 +00:00
Forgot to do it here
This commit is contained in:
parent
02393f6be3
commit
c9d3b26930
@ -137,13 +137,13 @@ public class UpdateChecker extends PlexBase
|
|||||||
public void updateJar()
|
public void updateJar()
|
||||||
{
|
{
|
||||||
CloseableHttpClient client = HttpClients.createDefault();
|
CloseableHttpClient client = HttpClients.createDefault();
|
||||||
HttpGet get = new HttpGet(DOWNLOAD_PAGE + "lastSuccessfulBuild/api/json");
|
HttpGet get = new HttpGet(DOWNLOAD_PAGE + "job/master/lastSuccessfulBuild/api/json");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
HttpResponse response = client.execute(get);
|
HttpResponse response = client.execute(get);
|
||||||
JSONObject object = new JSONObject(EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8));
|
JSONObject object = new JSONObject(EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8));
|
||||||
JSONObject artifact = object.getJSONArray("artifacts").getJSONObject(0);
|
JSONObject artifact = object.getJSONArray("artifacts").getJSONObject(0);
|
||||||
String name = artifact.getString("displayPath");
|
String name = artifact.getString("fileName");
|
||||||
PlexLog.log("Downloading latest Plex jar file: " + name);
|
PlexLog.log("Downloading latest Plex jar file: " + name);
|
||||||
CompletableFuture.runAsync(() ->
|
CompletableFuture.runAsync(() ->
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user