From c283e5c9a4a8877f74093251badd7bf16bf3b9fe Mon Sep 17 00:00:00 2001 From: Nanganator <64145564+Nanganator@users.noreply.github.com> Date: Thu, 19 Mar 2026 20:11:10 -0700 Subject: [PATCH 1/2] Add Seerr enhanced app Copy of existing Jellyseerr enhanced app with updated details and icon --- Seerr/Seerr.php | 73 +++++++++++++++++++++++++++++++++++++++ Seerr/app.json | 10 ++++++ Seerr/config.blade.php | 28 +++++++++++++++ Seerr/livestats.blade.php | 10 ++++++ Seerr/seerr.svg | 21 +++++++++++ 5 files changed, 142 insertions(+) create mode 100644 Seerr/Seerr.php create mode 100644 Seerr/app.json create mode 100644 Seerr/config.blade.php create mode 100644 Seerr/livestats.blade.php create mode 100644 Seerr/seerr.svg diff --git a/Seerr/Seerr.php b/Seerr/Seerr.php new file mode 100644 index 0000000000..8ed4d29411 --- /dev/null +++ b/Seerr/Seerr.php @@ -0,0 +1,73 @@ +jar = new \GuzzleHttp\Cookie\CookieJar; // Uncomment if cookies need to be set + } + + public function test() + { + $attrs = $this->getRequestAttrs(); + $test = parent::appTest($this->url("auth/me"), $attrs); + + echo $test->status; + } + + public function livestats() + { + $status = "inactive"; + $data = []; + $attrs = $this->getRequestAttrs(); + $requestsType = $this->getConfigValue("requests", "pending"); + $requestsCount = json_decode( + parent::execute($this->url("request/count"), $attrs)->getBody() + ); + $issuesType = $this->getConfigValue("issues", "open"); + $issuesCount = json_decode( + parent::execute($this->url("issue/count"), $attrs)->getBody() + ); + + if ($requestsCount || $issuesCount) { + $data["requests"] = $requestsCount->$requestsType ?? 0; + $data["issues"] = $issuesCount->$issuesType ?? 0; + } + + return parent::getLiveStats($status, $data); + } + + public function url($endpoint) + { + $api_url = + parent::normaliseurl($this->config->url) . + "api/v1/" . + $endpoint; + + return $api_url; + } + + public function getRequestAttrs() + { + $attrs["headers"] = [ + "accept" => "application/json", + "X-Api-Key" => $this->config->apikey, + ]; + + return $attrs; + } + + public function getConfigValue($key, $default = null) + { + return isset($this->config) && isset($this->config->$key) + ? $this->config->$key + : $default; + } +} diff --git a/Seerr/app.json b/Seerr/app.json new file mode 100644 index 0000000000..7a6501e1d0 --- /dev/null +++ b/Seerr/app.json @@ -0,0 +1,10 @@ +{ + "appid": "8941259431327e65f98ef6f45f6e673039837daa", + "name": "Seerr", + "website": "https://seerr.dev", + "license": "MIT License", + "description": "Seerr is a request management and media discovery tool built to work with your existing Plex/Jellyfin ecosystem.", + "enhanced": true, + "tile_background": "dark", + "icon": "seerr.svg" +} \ No newline at end of file diff --git a/Seerr/config.blade.php b/Seerr/config.blade.php new file mode 100644 index 0000000000..61c549bb8e --- /dev/null +++ b/Seerr/config.blade.php @@ -0,0 +1,28 @@ +