Skip to content

Commit c810077

Browse files
authored
Added the app Pinchflat
Added the app Pinchflat
1 parent 04e4045 commit c810077

5 files changed

Lines changed: 79 additions & 0 deletions

File tree

Pinchflat/Pinchflat.php

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
namespace App\SupportedApps\Pinchflat;
4+
5+
class Pinchflat extends \App\SupportedApps implements \App\EnhancedApps
6+
{
7+
8+
public $config;
9+
10+
//protected $login_first = true; // Uncomment if api requests need to be authed first
11+
//protected $method = 'POST'; // Uncomment if requests to the API should be set by POST
12+
13+
public function __construct()
14+
{
15+
//$this->jar = new \GuzzleHttp\Cookie\CookieJar; // Uncomment if cookies need to be set
16+
}
17+
18+
public function test()
19+
{
20+
$test = parent::appTest($this->url('status'));
21+
echo $test->status;
22+
}
23+
24+
public function livestats()
25+
{
26+
$status = 'inactive';
27+
$res = parent::execute($this->url('status'));
28+
$details = json_decode($res->getBody());
29+
30+
$data = [];
31+
return parent::getLiveStats($status, $data);
32+
33+
}
34+
35+
public function url($endpoint)
36+
{
37+
$api_url = parent::normaliseurl($this->config->url).$endpoint;
38+
return $api_url;
39+
}
40+
}

Pinchflat/app.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"appid": "24301c5e991ab307ddbc92673d2b1f4b501964a9",
3+
"name": "Pinchflat",
4+
"website": "https://github.com/kieraneglin/pinchflat",
5+
"license": "GNU Affero General Public License v3.0 or later",
6+
"description": "Pinchflat is a self-hosted app for downloading YouTube content built using yt-dlp. It's designed to be lightweight, self-contained, and easy to use. You set up rules for how to download content from YouTube channels or playlists and it'll do the rest, periodically checking for new content.",
7+
"enhanced": true,
8+
"tile_background": "dark",
9+
"icon": "pinchflat.png"
10+
}

Pinchflat/config.blade.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<h2>{{ __('app.apps.config') }} ({{ __('app.optional') }}) @include('items.enable')</h2>
2+
<div class="items">
3+
<div class="input">
4+
<label>{{ strtoupper(__('app.url')) }}</label>
5+
{!! Form::text('config[override_url]', null, array('placeholder' => __('app.apps.override'), 'id' => 'override_url', 'class' => 'form-control')) !!}
6+
</div>
7+
<div class="input">
8+
<label>{{ __('app.apps.username') }}</label>
9+
{!! Form::text('config[username]', null, array('placeholder' => __('app.apps.username'), 'data-config' => 'username', 'class' => 'form-control config-item')) !!}
10+
</div>
11+
<div class="input">
12+
<label>{{ __('app.apps.password') }}</label>
13+
{!! Form::input('password', 'config[password]', '', ['placeholder' => __('app.apps.password'), 'data-config' => 'password', 'class' => 'form-control config-item']) !!}
14+
</div>
15+
<div class="input">
16+
<button style="margin-top: 32px;" class="btn test" id="test_config">Test</button>
17+
</div>
18+
</div>
19+

Pinchflat/livestats.blade.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<ul class="livestats">
2+
<li>
3+
<span class="title">Queue</span>
4+
<strong>{!! $queue_size !!}</strong>
5+
</li>
6+
<li>
7+
<span class="title">Speed</span>
8+
<strong>{!! $current_speed !!}</strong>
9+
</li>
10+
</ul>

Pinchflat/pinchflat.png

56.5 KB
Loading

0 commit comments

Comments
 (0)