ajout heimdall
This commit is contained in:
+35
@@ -0,0 +1,35 @@
|
||||
<?php namespace App\SupportedApps\Ombi;
|
||||
|
||||
class Ombi 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('api/v1/status'));
|
||||
echo $test->status;
|
||||
}
|
||||
|
||||
public function livestats()
|
||||
{
|
||||
$status = 'inactive';
|
||||
$this->attrs['headers'] = ['ApiKey' => $this->config->apikey];
|
||||
$res = parent::execute($this->url('api/v1/request/count'), $this->attrs);
|
||||
$details = json_decode($res->getBody(), True);
|
||||
|
||||
return parent::getLiveStats($status, $details);
|
||||
|
||||
}
|
||||
public function url($endpoint)
|
||||
{
|
||||
$api_url = parent::normaliseurl($this->config->url).$endpoint;
|
||||
return $api_url;
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"appid": "57b25ceb94bd4c9ba9038ce17656f5ede9007e4c",
|
||||
"name": "Ombi",
|
||||
"website": "https://ombi.io/",
|
||||
"license": "GNU General Public License v2.0 only",
|
||||
"description": "Ombi is a self-hosted web application that automatically gives your shared Plex or Emby users the ability to request content by themselves! Ombi can be linked to multiple TV Show and Movie DVR tools to create a seamless end-to-end experience for your users.",
|
||||
"enhanced": true,
|
||||
"tile_background": "dark",
|
||||
"icon": "ombi.png"
|
||||
}
|
||||
+14
@@ -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), array('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), array('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>
|
||||
@@ -0,0 +1,4 @@
|
||||
<ul class="livestats">
|
||||
<li><span class="title">Pending</span><strong>{!! $pending !!}</strong></li>
|
||||
<li><span class="title">Approved</span><strong>{!! $approved !!}</strong></li>
|
||||
</ul>
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
Reference in New Issue
Block a user