fix: bad date format
This commit is contained in:
@@ -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;
|
||||||
@@ -212,6 +213,7 @@ class Tmdb
|
|||||||
$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) {
|
||||||
|
$data['air_date'] = Carbon::parse($data['air_date'])->format('m/d/Y');
|
||||||
$data['poster'] = (null !== $data['still_path']) ? self::POSTER_IMG_PATH . $data['still_path'] : null;
|
$data['poster'] = (null !== $data['still_path']) ? self::POSTER_IMG_PATH . $data['still_path'] : null;
|
||||||
return $data;
|
return $data;
|
||||||
})->toArray();
|
})->toArray();
|
||||||
|
|||||||
@@ -35,15 +35,10 @@
|
|||||||
>
|
>
|
||||||
<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'] }}
|
||||||
</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">
|
||||||
|
|||||||
Reference in New Issue
Block a user