ajout heimdall

This commit is contained in:
2025-01-01 11:24:01 +01:00
parent f8be42e486
commit c52f60fca9
1477 changed files with 15692 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
<?php namespace App\SupportedApps\Radarr;
class Radarr extends \App\SupportedApps implements \App\EnhancedApps
{
public $config;
//protected $login_first = true; // Uncomment if api requests need to be authed first
//protected $method = 'POST'; // Uncomment if requests to the API should be set by POST
function __construct()
{
//$this->jar = new \GuzzleHttp\Cookie\CookieJar; // Uncomment if cookies need to be set
}
public function test()
{
$test = parent::appTest($this->url("system/status"));
echo $test->status;
}
public function livestats()
{
$status = "inactive";
$data = [];
$movies = json_decode(parent::execute($this->url("movie"))->getBody());
$queue = json_decode(parent::execute($this->url("queue"))->getBody());
$collect = collect($movies);
$missing = $collect->where("monitored", true)->where("isAvailable", true)->where("hasFile", false);
$data = [];
if ($missing || $queue) {
$data["missing"] = $missing->count() ?? 0;
$data["queue"] = count($queue->records) ?? 0;
}
return parent::getLiveStats($status, $data);
}
public function url($endpoint)
{
$api_url =
parent::normaliseurl($this->config->url) .
"api/v3/" .
$endpoint .
"?apikey=" .
$this->config->apikey;
return $api_url;
}
}

View File

@@ -0,0 +1,31 @@
{
"appid": "8a5cd39a1a5dff323d63bbe45fffe0c9c03bd2e7",
"name": "Radarr",
"website": "https://radarr.video",
"license": "GNU General Public License v3.0 only",
"description": "Radarr is an independent fork of Sonarr reworked for automatically downloading movies via Usenet and BitTorrent.\r\n\r\nThe project was inspired by other Usenet/BitTorrent movie downloaders such as CouchPotato.",
"enhanced": true,
"tile_background": "light",
"icon": "radarr.svg",
"config": {
"type": "apikey",
"stat1": {
"name": "Missing",
"url": ":url:api/v3/movie?apikey=:apikey:",
"key": "",
"filter": "filter",
"filterBy": "hasFile",
"filterByValue": "false",
"updateOnChange": "no",
"suffix": ""
},
"stat2": {
"name": "Queue",
"url": ":url:api/v3/queue?apikey=:apikey:",
"key": "totalRecords",
"filter": "none",
"updateOnChange": "no",
"suffix": ""
}
}
}

View File

@@ -0,0 +1,14 @@
<h2>{{ __('app.apps.config') }} ({{ __('app.optional') }}) @include('items.enable')</h2>
<div class="items">
<div class="input">
<label>{{ strtoupper(__('app.url')) }}</label>
{!! Form::text('config[override_url]', isset($item) ? $item->getconfig()->override_url : null, ['placeholder' => __('app.apps.override'), 'id' => 'override_url', 'class' => 'form-control']) !!}
</div>
<div class="input">
<label>{{ __('app.apps.apikey') }}</label>
{!! Form::text('config[apikey]', isset($item) ? $item->getconfig()->apikey : null, ['placeholder' => __('app.apps.apikey'), 'data-config' => 'apikey', 'class' => 'form-control config-item']) !!}
</div>
<div class="input">
<button style="margin-top: 32px;" class="btn test" id="test_config">Test</button>
</div>
</div>

View File

@@ -0,0 +1,10 @@
<ul class="livestats">
<li>
<span class="title">Missing</span>
<strong>{!! $missing !!}</strong>
</li>
<li>
<span class="title">Queue</span>
<strong>{!! $queue !!}</strong>
</li>
</ul>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB