Compare commits

...

4 Commits

4 changed files with 5 additions and 8 deletions

View File

@@ -11,7 +11,7 @@ framework:
trusted_headers: [ 'x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port', 'x-forwarded-prefix' ] trusted_headers: [ 'x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port', 'x-forwarded-prefix' ]
session: session:
handler_id: Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler handler_id: '%env(REDIS_HOST)%'
#esi: true #esi: true
#fragments: true #fragments: true

View File

@@ -1,6 +1,7 @@
twig: twig:
file_name_pattern: '*.twig' file_name_pattern: '*.twig'
date: date:
format: 'm/d/Y'
timezone: '%env(default:app.default.timezone:TZ)%' timezone: '%env(default:app.default.timezone:TZ)%'
when@test: when@test:

View File

@@ -5,6 +5,7 @@ namespace App\Tmdb;
use Aimeos\Map; use Aimeos\Map;
use App\Enum\MediaType; use App\Enum\MediaType;
use App\ValueObject\ResultFactory; use App\ValueObject\ResultFactory;
use Carbon\Carbon;
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\CacheInterface; use Symfony\Contracts\Cache\CacheInterface;
@@ -273,7 +274,7 @@ class Tmdb
private function parseEpisode(array $data, string $posterBasePath): TmdbResult private function parseEpisode(array $data, string $posterBasePath): TmdbResult
{ {
return new TmdbResult( return new TmdbResult(
imdbId: $data['external_ids']['imdb_id'] ?? $this->getImdbId($data['id'], 'tvshows'), imdbId: $data['external_ids']['imdb_id'],
tmdbId: $data['id'], tmdbId: $data['id'],
title: $data['name'], title: $data['name'],
poster: (null !== $data['still_path']) ? $posterBasePath . $data['still_path'] : null, poster: (null !== $data['still_path']) ? $posterBasePath . $data['still_path'] : null,

View File

@@ -36,14 +36,9 @@
<span {{ stimulus_target('tv-results', 'count') }}>0</span> results <span {{ stimulus_target('tv-results', 'count') }}>0</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'] }}">
{{ episode['air_date'] }} {{ episode['air_date']|date }}
</small> </small>
<small class="py-1 px-1.5 grow-0 font-bold bg-red-600 hover:bg-red-700 rounded-lg font-normal text-white cursor-pointer" title="Clear cache for {{ episode['name'] }}"
{{ stimulus_action('tv-results', 'clearCache', 'click') }}
>Clear Cache</small>
</div> </div>
</div> </div>
<div class="flex flex-col gap-4 justify-between"> <div class="flex flex-col gap-4 justify-between">