Compare commits
7 Commits
v0.18.13
...
dev-stream
| Author | SHA1 | Date | |
|---|---|---|---|
| eb37df7c3e | |||
| be7b610111 | |||
| 3e93a7c9c1 | |||
| bc78b83f8d | |||
| c5bcaeb1d4 | |||
| e39182ba91 | |||
| 965b747594 |
@@ -3,6 +3,7 @@ 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"
|
||||||
|
|
||||||
RUN install-php-extensions \
|
RUN install-php-extensions \
|
||||||
pdo_mysql \
|
pdo_mysql \
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import './bootstrap.js';
|
import './bootstrap.js';
|
||||||
|
import Hls from "./vendor/hls.js/hls.js.index.js";
|
||||||
/*
|
/*
|
||||||
* Welcome to your app's main JavaScript file!
|
* Welcome to your app's main JavaScript file!
|
||||||
*
|
*
|
||||||
@@ -18,3 +19,29 @@ var observer = new MutationObserver(function(mutations) {
|
|||||||
|
|
||||||
observer.observe(document, {attributes: false, childList: true, characterData: false, subtree:true});
|
observer.observe(document, {attributes: false, childList: true, characterData: false, subtree:true});
|
||||||
|
|
||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
const videoUrl = "http://127.0.0.1:11470/hlsv2/2b76fe2ec12c83d264076fb859923c5d/master.m3u8?mediaURL=https%3A%2F%2Ftorrentio.strem.fun%2Frealdebrid%2FQYYBR7OSQ4VEFKWASDEZ2B4VO67KHUJY6IWOT7HHA7ATXO7QCYDQ%2F6bf1938db882f6fcbb0dafa6e7326230e7f4eae0%2Fnull%2F3%2FSurvivor.S48E01.1080p.HEVC.x265-MeGusta.mkv%26videoCodecs%3Dh264%26videoCodecs%3Dh265%26videoCodecs%3Dhevc%26videoCodecs%3Dvp9%26audioCodecs%3Daac%26audioCodecs%3Dmp3%26audioCodecs%3Dopus%26maxAudioChannels%3D2";
|
||||||
|
|
||||||
|
var video = document.getElementById('video');
|
||||||
|
if (Hls.isSupported()) {
|
||||||
|
var hls = new Hls({
|
||||||
|
debug: true,
|
||||||
|
});
|
||||||
|
hls.loadSource(videoUrl);
|
||||||
|
hls.attachMedia(video);
|
||||||
|
hls.on(Hls.Events.MEDIA_ATTACHED, function () {
|
||||||
|
video.muted = true;
|
||||||
|
video.play();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// hls.js is not supported on platforms that do not have Media Source Extensions (MSE) enabled.
|
||||||
|
// When the browser has built-in HLS support (check using `canPlayType`), we can provide an HLS manifest (i.e. .m3u8 URL) directly to the video element through the `src` property.
|
||||||
|
// This is using the built-in support of the plain video element, without using hls.js.
|
||||||
|
else if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
||||||
|
video.src = videoUrl;
|
||||||
|
video.addEventListener('canplay', function () {
|
||||||
|
video.play();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ export default class extends Controller {
|
|||||||
this.options.forEach((option) => option.querySelector('.download-btn').dataset['title'] = this.titleValue);
|
this.options.forEach((option) => option.querySelector('.download-btn').dataset['title'] = this.titleValue);
|
||||||
this.options[0].querySelector('input[type="checkbox"]').checked = true;
|
this.options[0].querySelector('input[type="checkbox"]').checked = true;
|
||||||
} else {
|
} else {
|
||||||
|
this.countTarget.innerText = 0;
|
||||||
this.episodeSelectorTarget.disabled = true;
|
this.episodeSelectorTarget.disabled = true;
|
||||||
}
|
}
|
||||||
this.loadingIconOutlet.increaseCount();
|
this.loadingIconOutlet.increaseCount();
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
twig:
|
twig:
|
||||||
|
globals:
|
||||||
|
version: '%app.version%'
|
||||||
file_name_pattern: '*.twig'
|
file_name_pattern: '*.twig'
|
||||||
date:
|
date:
|
||||||
format: 'm/d/Y'
|
format: 'm/d/Y'
|
||||||
|
|||||||
@@ -22,8 +22,11 @@ parameters:
|
|||||||
app.cache.redis.host.default: 'redis://redis'
|
app.cache.redis.host.default: 'redis://redis'
|
||||||
|
|
||||||
# Various configs
|
# Various configs
|
||||||
|
app.default.version: '0.dev'
|
||||||
app.default.timezone: 'America/Chicago'
|
app.default.timezone: 'America/Chicago'
|
||||||
|
|
||||||
|
app.version: '%env(default:app.default.version:APP_VERSION)%'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# default configuration for services in *this* file
|
# default configuration for services in *this* file
|
||||||
_defaults:
|
_defaults:
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ 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"
|
||||||
|
|
||||||
|
ARG APP_VERSION="0.dev"
|
||||||
|
ENV APP_VERSION="${APP_VERSION}"
|
||||||
|
|
||||||
RUN install-php-extensions \
|
RUN install-php-extensions \
|
||||||
pdo_mysql \
|
pdo_mysql \
|
||||||
gd \
|
gd \
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ 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"
|
||||||
|
|
||||||
|
ARG APP_VERSION="0.dev"
|
||||||
|
ENV APP_VERSION="${APP_VERSION}"
|
||||||
|
|
||||||
RUN install-php-extensions \
|
RUN install-php-extensions \
|
||||||
pdo_mysql \
|
pdo_mysql \
|
||||||
gd \
|
gd \
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ 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"
|
||||||
|
|
||||||
|
ARG APP_VERSION="0.dev"
|
||||||
|
ENV APP_VERSION="${APP_VERSION}"
|
||||||
|
|
||||||
RUN install-php-extensions \
|
RUN install-php-extensions \
|
||||||
pdo_mysql \
|
pdo_mysql \
|
||||||
gd \
|
gd \
|
||||||
|
|||||||
@@ -40,4 +40,7 @@ return [
|
|||||||
'stimulus-use' => [
|
'stimulus-use' => [
|
||||||
'version' => '0.52.2',
|
'version' => '0.52.2',
|
||||||
],
|
],
|
||||||
|
'hls.js' => [
|
||||||
|
'version' => '1.6.5',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -61,10 +61,10 @@ readonly class MonitorTvShowHandler implements HandlerInterface
|
|||||||
// Dispatch Episode commands for each missing Episode
|
// Dispatch Episode commands for each missing Episode
|
||||||
foreach ($episodesInShow as $episode) {
|
foreach ($episodesInShow as $episode) {
|
||||||
// Only monitor future episodes
|
// Only monitor future episodes
|
||||||
$episodeInFuture = $this->episodeInFuture($episode);
|
$episodeInFuture = $this->episodeReleasedAfterMonitorCreated($monitor->getCreatedAt(), $episode);
|
||||||
$this->logger->info('> [MonitorTvShowHandler] Episode is in future for season ' . $episode['season_number'] . ' episode ' . $episode['episode_number'] . ' for title: ' . $monitor->getTitle() . ' ? ' . (true === $episodeInFuture ? 'YES' : 'NO'));
|
$this->logger->info('> [MonitorTvShowHandler] Episode released after monitor started for season ' . $episode['season_number'] . ' episode ' . $episode['episode_number'] . ' for title: ' . $monitor->getTitle() . ' ? ' . (true === $episodeInFuture ? 'YES' : 'NO'));
|
||||||
if (false === $episodeInFuture) {
|
if (false === $episodeInFuture) {
|
||||||
$this->logger->info('> [MonitorTvShowHandler] Episode not in future for title: ' . 'for season ' . $episode['season_number'] . ' episode ' . $episode['episode_number'] . ', skipping');
|
$this->logger->info('> [MonitorTvShowHandler] Episode released after monitor started for title: ' . 'for season ' . $episode['season_number'] . ' episode ' . $episode['episode_number'] . ', skipping');
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -125,11 +125,11 @@ readonly class MonitorTvShowHandler implements HandlerInterface
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function episodeInFuture(array $episodeInShow): bool
|
private function episodeReleasedAfterMonitorCreated(string|DateTimeImmutable $monitorStartDate, array $episodeInShow): bool
|
||||||
{
|
{
|
||||||
static $today = Carbon::today();
|
$monitorStartDate = Carbon::parse($monitorStartDate)->setTime(0, 0);
|
||||||
$episodeAirDate = Carbon::parse($episodeInShow['air_date']);
|
$episodeAirDate = Carbon::parse($episodeInShow['air_date']);
|
||||||
return $episodeAirDate >= $today;
|
return $episodeAirDate >= $monitorStartDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function episodeExists(array $episodeInShow, Map $downloadedEpisodes): bool
|
private function episodeExists(array $episodeInShow, Map $downloadedEpisodes): bool
|
||||||
|
|||||||
@@ -38,13 +38,13 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sticky inset-x-0 bottom-0 border-t border-orange-500">
|
<div class="sticky inset-x-0 bottom-0 border-t border-b border-orange-500 bg-orange-500 hover:bg-opacity-80 bg-clip-padding backdrop-filter backdrop-blur-md bg-opacity-60 flex flex-col">
|
||||||
<a href="#" class="nav-foot flex items-center gap-2 p-4 bg-orange-500 hover:bg-opacity-80 bg-clip-padding backdrop-filter backdrop-blur-md bg-opacity-60">
|
<a href="#" class="nav-foot flex items-center gap-2 pt-4 px-4">
|
||||||
<span class="rounded-full p-2 border-orange-500 border-2">
|
<span class="rounded-full p-2 border-orange-500 border-2">
|
||||||
<twig:ux:icon name="ri:user-line" width="30" class="text-gray-50"/>
|
<twig:ux:icon name="ri:user-line" width="30" class="text-gray-50"/>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div>
|
<div class="flex flex-col text-white">
|
||||||
<p class="text-xs">
|
<p class="text-xs">
|
||||||
{% if app.user.name %}
|
{% if app.user.name %}
|
||||||
<strong class="block font-medium text-white">{{ app.user.name }}</strong>
|
<strong class="block font-medium text-white">{{ app.user.name }}</strong>
|
||||||
@@ -54,5 +54,8 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
<p class="px-4 pt-1 inline-flex justify-center">
|
||||||
|
<small class="text-white text-xs">v{{ version|default('0.0') }}</small>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<button class="py-1 px-1.5 mr-1 grow-0 font-bold text-xs bg-green-600 rounded-lg hover:cursor-pointer hover:bg-green-700 text-white"
|
<button class="py-1 px-1.5 mr-1 grow-0 font-bold text-xs bg-green-600 rounded-lg hover:cursor-pointer hover:bg-green-700 text-white"
|
||||||
{{ stimulus_action('tv-results', 'toggleList', 'click') }}
|
{{ stimulus_action('tv-results', 'toggleList', 'click') }}
|
||||||
>
|
>
|
||||||
<span {{ stimulus_target('tv-results', 'count') }}>0</span> results
|
<span {{ stimulus_target('tv-results', 'count') }}>-</span> results
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<small class="py-1 px-1.5 mr-1 grow-0 font-bold bg-gray-700 rounded-lg font-normal text-white" title="Air date {{ episode['name'] }}">
|
<small class="py-1 px-1.5 mr-1 grow-0 font-bold bg-gray-700 rounded-lg font-normal text-white" title="Air date {{ episode['name'] }}">
|
||||||
|
|||||||
@@ -5,6 +5,12 @@
|
|||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="p-4 flex flex-col grow gap-4 z-30">
|
<div class="p-4 flex flex-col grow gap-4 z-30">
|
||||||
<h2 class="mb-2 text-3xl font-bold text-gray-50">Dashboard</h2>
|
<h2 class="mb-2 text-3xl font-bold text-gray-50">Dashboard</h2>
|
||||||
|
<div class="flex flex-row gap-4">
|
||||||
|
<twig:Card title="Play Survivor" class="w-full">
|
||||||
|
<video width="352" height="198" controls>
|
||||||
|
</video>
|
||||||
|
</twig:Card>
|
||||||
|
</div>
|
||||||
<div class="flex flex-row gap-4">
|
<div class="flex flex-row gap-4">
|
||||||
<twig:Card title="Active Downloads" class="w-full">
|
<twig:Card title="Active Downloads" class="w-full">
|
||||||
<twig:DownloadList :type="'active'" />
|
<twig:DownloadList :type="'active'" />
|
||||||
|
|||||||
Reference in New Issue
Block a user