mirror of
https://github.com/plexusorg/Plex.git
synced 2026-06-04 05:26:55 +00:00
Fix the updater
This commit is contained in:
@@ -14,6 +14,9 @@ group = rootProject.group
|
|||||||
version = rootProject.version
|
version = rootProject.version
|
||||||
description = "Plex-API"
|
description = "Plex-API"
|
||||||
|
|
||||||
|
tasks.getByName<Jar>("jar") {
|
||||||
|
archiveBaseName.set("Plex-API")
|
||||||
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ public class UpdateChecker
|
|||||||
try (BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8)))
|
try (BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8)))
|
||||||
{
|
{
|
||||||
JsonObject object = new Gson().fromJson(reader, JsonObject.class);
|
JsonObject object = new Gson().fromJson(reader, JsonObject.class);
|
||||||
JsonObject artifact = object.getAsJsonArray("artifacts").asList().getFirst().getAsJsonObject();
|
JsonObject artifact = object.getAsJsonArray("artifacts").get(module ? 0 : 1).getAsJsonObject();
|
||||||
String jarFile = artifact.get("fileName").getAsString();
|
String jarFile = artifact.get("fileName").getAsString();
|
||||||
sendMessage(sender, PlexUtils.mmDeserialize("<green>Downloading latest JAR file: " + jarFile));
|
sendMessage(sender, PlexUtils.mmDeserialize("<green>Downloading latest JAR file: " + jarFile));
|
||||||
File copyTo;
|
File copyTo;
|
||||||
|
|||||||
Reference in New Issue
Block a user