Compare commits

..

6 Commits

6 changed files with 19 additions and 10 deletions

10
Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM code.caldwell.digital/home/torsearch-base:php8.4
ENV SERVER_NAME=":80"
ENV CADDY_GLOBAL_OPTIONS="auto_https off"
ENV APP_RUNTIME="Runtime\\FrankenPhpSymfony\\Runtime"
ENV APP_VERSION="0.0.0-dev"
HEALTHCHECK --interval=3s --timeout=3s --retries=10 CMD [ "php", "/app/bin/console", "startup:status" ]
COPY --chmod=0755 docker/app/Caddyfile /etc/frankenphp/Caddyfile

View File

@@ -22,7 +22,7 @@ export default class extends Controller {
defaultOptions = '<option value="-">-</option>'; defaultOptions = '<option value="-">-</option>';
static outlets = ['tv-episode-list'] static outlets = ['tv-episode-list']
static targets = ['resolution', 'codec', 'language', 'provider', 'season', 'quality', 'selectAll', 'downloadSelected'] static targets = ['resolution', 'codec', 'language', 'provider', 'season', 'quality', 'selectAll', 'downloadSelected', 'currentSeason']
static values = { static values = {
'imdbId': String, 'imdbId': String,
'media-type': String, 'media-type': String,
@@ -94,7 +94,9 @@ export default class extends Controller {
} }
setSeason(event) { setSeason(event) {
console.log('hurrrr');
this.tvEpisodeListOutlet.setSeason(event.target.value); this.tvEpisodeListOutlet.setSeason(event.target.value);
this.currentSeasonTarget.innerText = event.target.value;
} }
downloadSeason() { downloadSeason() {

View File

@@ -15,11 +15,7 @@ services:
app: app:
build: build: .
dockerfile: docker/Dockerfile.base.app
context: .
args:
FRANKENPHP_TAG: php8.4
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- $PWD:/app - $PWD:/app

View File

@@ -23,6 +23,7 @@ class GetMediaInfoHandler implements HandlerInterface
$handlers = [ $handlers = [
MediaType::Movie->value => 'getMovieDetails', MediaType::Movie->value => 'getMovieDetails',
MediaType::TvShow->value => 'getTvshowDetails', MediaType::TvShow->value => 'getTvshowDetails',
MediaType::TvEpisode->value => 'getTvshowDetails',
]; ];
$handler = $handlers[$command->mediaType]; $handler = $handlers[$command->mediaType];
$media = $this->$handler($command); $media = $this->$handler($command);

View File

@@ -39,9 +39,9 @@
</div> </div>
{{ form_end(preferences_form) }} {{ form_end(preferences_form) }}
<div class="flex flex-col md:flex-row justify-between"> <div class="flex flex-col-reverse md:flex-row justify-between">
{% if results.media.mediaType == "tvshows" %} {% if results.media.mediaType == "tvshows" %}
<p>Season {{ results.season }}</p> <p class="ml-2 mt-3 md:[margin-top:unset] md:self-center">Season <span data-result-filter-target="currentSeason" class="current-season">{{ results.season }}</span></p>
<div class="flex flex-row gap-2 justify-end px-8"> <div class="flex flex-row gap-2 justify-end px-8">
<twig:Modal heading="Back up a sec!" button_text="Download Season" submit_action="{{ stimulus_action('result_filter', 'downloadSeason', 'click')|stimulus_action('dialog', 'close') }}" button_class="px-1.5 py-1 border border-green-500 bg-green-800/60 rounded-ms text-sm font-semibold" show_cancel show_submit> <twig:Modal heading="Back up a sec!" button_text="Download Season" submit_action="{{ stimulus_action('result_filter', 'downloadSeason', 'click')|stimulus_action('dialog', 'close') }}" button_class="px-1.5 py-1 border border-green-500 bg-green-800/60 rounded-ms text-sm font-semibold" show_cancel show_submit>
Downloading an entire season this way will use the filter from your Downloading an entire season this way will use the filter from your

View File

@@ -83,10 +83,10 @@
{% if results.media.mediaType == "tvshows" %} {% if results.media.mediaType == "tvshows" %}
<div class="flex flex-row justify-start items-end grow text-xs"> <div class="flex flex-row justify-start items-end grow text-xs">
<span class="py-1 px-1.5 mr-1 grow-0 font-bold text-xs bg-orange-500 rounded-lg hover:cursor-pointer hover:bg-green-700 text-white"> <span class="py-1 px-1.5 mr-1 grow-0 font-bold text-xs bg-orange-500 rounded-lg text-white">
<span>{{ results.media.numberSeasons }}</span> season(s) <span>{{ results.media.numberSeasons }}</span> season(s)
</span> </span>
<span class="py-1 px-1.5 mr-1 grow-0 bg-sky-700 rounded-lg text-white" title='"{{ results.media.title }}" first aired on {{ results.media.premiereDate|date(null, 'UTC') }}.'> <span class="py-1 px-1.5 mr-1 grow-0 font-bold bg-sky-700 rounded-lg text-white" title='"{{ results.media.title }}" first aired on {{ results.media.premiereDate|date(null, 'UTC') }}.'>
{{ results.media.premiereDate|date(null, 'UTC') }} {{ results.media.premiereDate|date(null, 'UTC') }}
</span> </span>
</div> </div>