Fix the updater

This commit is contained in:
2026-05-19 13:35:51 -04:00
parent 77dde83de3
commit b6e31436b2
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -14,6 +14,9 @@ group = rootProject.group
version = rootProject.version
description = "Plex-API"
tasks.getByName<Jar>("jar") {
archiveBaseName.set("Plex-API")
}
publishing {
publications {
@@ -172,7 +172,7 @@ public class UpdateChecker
try (BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8)))
{
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();
sendMessage(sender, PlexUtils.mmDeserialize("<green>Downloading latest JAR file: " + jarFile));
File copyTo;