From c09a52ee3c6bf524c2593ca737ce76109fa62987 Mon Sep 17 00:00:00 2001 From: Boy132 Date: Tue, 11 Nov 2025 11:50:48 +0100 Subject: [PATCH] support update jsons that cover multiple plugins --- app/Models/Plugin.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Models/Plugin.php b/app/Models/Plugin.php index e53b9dbfe..50f46f499 100644 --- a/app/Models/Plugin.php +++ b/app/Models/Plugin.php @@ -240,7 +240,14 @@ class Plugin extends Model implements HasPluginSettings return cache()->remember("plugins.$this->id.update", now()->addMinutes(10), function () { try { - return json_decode(file_get_contents($this->update_url), true, 512, JSON_THROW_ON_ERROR); + $data = json_decode(file_get_contents($this->update_url), true, 512, JSON_THROW_ON_ERROR); + + // Support update jsons that cover multiple plugins + if (array_key_exists($this->id, $data)) { + $data = $data[$this->id]; + } + + return $data; } catch (Exception $exception) { report($exception); }