Compare commits
1 Commits
dev-php85-
...
24355a4b30
| Author | SHA1 | Date | |
|---|---|---|---|
| 24355a4b30 |
15
Dockerfile
15
Dockerfile
@@ -1,17 +1,16 @@
|
|||||||
FROM registry.caldwell.digital/home/frankenphp:1.9.0-php8.5.0-ubuntu
|
FROM dunglas/frankenphp:php8.4
|
||||||
|
|
||||||
ENV SERVER_NAME=":80"
|
ENV SERVER_NAME=":80"
|
||||||
ENV CADDY_GLOBAL_OPTIONS="auto_https off"
|
ENV CADDY_GLOBAL_OPTIONS="auto_https off"
|
||||||
ENV APP_RUNTIME="Runtime\\FrankenPhpSymfony\\Runtime"
|
ENV APP_RUNTIME="Runtime\\FrankenPhpSymfony\\Runtime"
|
||||||
ENV APP_VERSION="0.0.1"
|
ENV APP_VERSION="0.0.1"
|
||||||
ENV SERVER_ROOT="/app/public"
|
|
||||||
|
|
||||||
#RUN install-php-extensions \
|
RUN install-php-extensions \
|
||||||
# pdo_mysql \
|
pdo_mysql \
|
||||||
# gd \
|
gd \
|
||||||
# intl \
|
intl \
|
||||||
# zip \
|
zip \
|
||||||
# opcache
|
opcache
|
||||||
|
|
||||||
RUN apt update && apt install -y wget
|
RUN apt update && apt install -y wget
|
||||||
|
|
||||||
|
|||||||
@@ -23,9 +23,6 @@ services:
|
|||||||
- mercure_data:/data
|
- mercure_data:/data
|
||||||
- mercure_config:/config
|
- mercure_config:/config
|
||||||
tty: true
|
tty: true
|
||||||
ports:
|
|
||||||
- "8001:80"
|
|
||||||
command: "frankenphp php-server --root=/app/public"
|
|
||||||
environment:
|
environment:
|
||||||
TZ: America/Chicago
|
TZ: America/Chicago
|
||||||
MERCURE_PUBLISHER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
|
MERCURE_PUBLISHER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
frankenphp {
|
frankenphp {
|
||||||
{$FRANKENPHP_CONFIG}
|
{$FRANKENPHP_CONFIG}
|
||||||
num_threads 10
|
|
||||||
max_threads 20
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,60 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
require_once '../vendor/autoload.php';
|
|
||||||
|
|
||||||
use App\Torrentio\Result\ResultFactory;
|
|
||||||
|
|
||||||
$realDebridKey = "";
|
|
||||||
$tasks = [];
|
|
||||||
$results = [];
|
|
||||||
$start = microtime(true);
|
|
||||||
for ($i = 1; $i <= 20; $i++) {
|
|
||||||
$tasks[] = \Async\spawn(function () use ($i, &$results, &$realDebridKey) {
|
|
||||||
$baseUrl = "https://torrentio.strem.fun/providers%253Dyts%252Ceztv%252Crarbg%252C1337x%252Cthepiratebay%252Ckickasstorrents%252Ctorrentgalaxy%252Cmagnetdl%252Chorriblesubs%252Cnyaasi%7Csort%253Dqualitysize%7Cqualityfilter%253D480p%252Cscr%252Ccam%7Crealdebrid={$realDebridKey}/stream/movie/tt0412142:1:$i.json";
|
|
||||||
$options = \json_decode(file_get_contents($baseUrl), true);
|
|
||||||
|
|
||||||
foreach ($options['streams'] as $stream) {
|
|
||||||
if (!str_starts_with($stream['url'], "https")) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
|
||||||
array_key_exists('behaviorHints', $stream) &&
|
|
||||||
array_key_exists('bingeGroup', $stream['behaviorHints'])
|
|
||||||
) {
|
|
||||||
$bingeGroup = $stream['behaviorHints']['bingeGroup'];
|
|
||||||
} else {
|
|
||||||
$bingeGroup = '-';
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = ResultFactory::map(
|
|
||||||
$stream['url'],
|
|
||||||
$stream['title'],
|
|
||||||
$bingeGroup
|
|
||||||
);
|
|
||||||
|
|
||||||
$results[] = $result;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
\Async\awaitAll($tasks);
|
|
||||||
$end = microtime(true) - $start;
|
|
||||||
dd($end, $results);
|
|
||||||
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//// Spawn multiple concurrent coroutines
|
|
||||||
//Async\spawn(function() {
|
|
||||||
// echo "Starting coroutine 1\n";
|
|
||||||
// sleep(2); // Non-blocking in async context
|
|
||||||
// echo "Coroutine 1 completed\n";
|
|
||||||
//});
|
|
||||||
//
|
|
||||||
//Async\spawn(function() {
|
|
||||||
// echo "Starting coroutine 2\n";
|
|
||||||
// sleep(1); // Non-blocking in async context
|
|
||||||
// echo "Coroutine 2 completed\n";
|
|
||||||
//});
|
|
||||||
//
|
|
||||||
//echo "All coroutines started\n";
|
|
||||||
|
|
||||||
@@ -2,12 +2,10 @@
|
|||||||
|
|
||||||
namespace App\Tmdb;
|
namespace App\Tmdb;
|
||||||
|
|
||||||
use \Async;
|
|
||||||
use Aimeos\Map;
|
use Aimeos\Map;
|
||||||
use App\Base\Enum\MediaType;
|
use App\Base\Enum\MediaType;
|
||||||
use App\ValueObject\ResultFactory;
|
use App\ValueObject\ResultFactory;
|
||||||
use Psr\Cache\CacheItemPoolInterface;
|
use Psr\Cache\CacheItemPoolInterface;
|
||||||
use Psr\Log\LoggerInterface;
|
|
||||||
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
||||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||||
use Symfony\Contracts\Cache\ItemInterface;
|
use Symfony\Contracts\Cache\ItemInterface;
|
||||||
@@ -44,7 +42,6 @@ class Tmdb
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly CacheItemPoolInterface $cache,
|
private readonly CacheItemPoolInterface $cache,
|
||||||
private readonly EventDispatcherInterface $eventDispatcher,
|
private readonly EventDispatcherInterface $eventDispatcher,
|
||||||
private readonly LoggerInterface $logger,
|
|
||||||
#[Autowire(env: 'TMDB_API')] string $apiKey,
|
#[Autowire(env: 'TMDB_API')] string $apiKey,
|
||||||
) {
|
) {
|
||||||
$this->client = new Client(
|
$this->client = new Client(
|
||||||
@@ -217,6 +214,7 @@ class Tmdb
|
|||||||
if ($season['episode_count'] <= 0 || $season['name'] === 'Specials') {
|
if ($season['episode_count'] <= 0 || $season['name'] === 'Specials') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$series['episodes'][$season['season_number']] = Map::from(
|
$series['episodes'][$season['season_number']] = Map::from(
|
||||||
$client->getApi()->getSeason($series['id'], $season['season_number'])['episodes']
|
$client->getApi()->getSeason($series['id'], $season['season_number'])['episodes']
|
||||||
)->map(function ($data) {
|
)->map(function ($data) {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ use Symfony\UX\LiveComponent\Attribute\LiveProp;
|
|||||||
use Symfony\UX\LiveComponent\DefaultActionTrait;
|
use Symfony\UX\LiveComponent\DefaultActionTrait;
|
||||||
|
|
||||||
#[AsLiveComponent]
|
#[AsLiveComponent]
|
||||||
final class TvEpisodeList
|
final class TvEpisodeList
|
||||||
{
|
{
|
||||||
use DefaultActionTrait;
|
use DefaultActionTrait;
|
||||||
use PaginateTrait;
|
use PaginateTrait;
|
||||||
|
|||||||
@@ -73,18 +73,15 @@
|
|||||||
{{ stimulus_action('result_filter', 'setSeason', 'change') }}
|
{{ stimulus_action('result_filter', 'setSeason', 'change') }}
|
||||||
{{ stimulus_action('result_filter', 'uncheckSelectAllBtn', 'change') }}
|
{{ stimulus_action('result_filter', 'uncheckSelectAllBtn', 'change') }}
|
||||||
>
|
>
|
||||||
<option selected value="1">1</option>
|
{% for season in range(1, results.media.episodes|length) %}
|
||||||
{% for season in range(2, results.media.episodes|length) %}
|
<option value="{{ season }}"
|
||||||
<option value="{{ season }}">{{ season }}</option>
|
{% if results.season == season %}
|
||||||
|
selected="selected"
|
||||||
|
{% endif %}
|
||||||
|
>{{ season }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
{# <label for="episodeNumber">#}
|
|
||||||
{# Episode#}
|
|
||||||
{# <select id="episodeNumber" name="episodeNumber" data-result-filter-target="episode" class="px-1 py-0.5 bg-stone-100 text-gray-800 rounded-sm">#}
|
|
||||||
{# <option selected value="">n/a</option>#}
|
|
||||||
{# </select>#}
|
|
||||||
{# </label>#}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span {{ stimulus_controller('loading_icon', {total: (results.media.mediaType == "tvshows") ? results.media.episodes[1]|length : 1, count: 0}) }}
|
<span {{ stimulus_controller('loading_icon', {total: (results.media.mediaType == "tvshows") ? results.media.episodes[1]|length : 1, count: 0}) }}
|
||||||
class="loading-icon">
|
class="loading-icon">
|
||||||
|
|||||||
Reference in New Issue
Block a user