feat: adds episode air date to results
This commit is contained in:
@@ -48,12 +48,12 @@ final class TorrentioController extends AbstractController
|
||||
$input->episode,
|
||||
);
|
||||
|
||||
return $cache->get($cacheId, function (ItemInterface $item) use ($input) {
|
||||
$item->expiresAt(new \DateTimeImmutable("today 11:59 pm"));
|
||||
// return $cache->get($cacheId, function (ItemInterface $item) use ($input) {
|
||||
// $item->expiresAt(new \DateTimeImmutable("today 11:59 pm"));
|
||||
$results = $this->getTvShowOptionsHandler->handle($input->toCommand());
|
||||
return $this->render('torrentio/tvshows.html.twig', [
|
||||
'results' => $results,
|
||||
]);
|
||||
});
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,6 +241,7 @@ class Tmdb
|
||||
year: (new \DateTime($data['air_date']))->format('Y'),
|
||||
mediaType: "tvshows",
|
||||
episodes: null,
|
||||
episodeAirDate: (new \DateTime($data['air_date']))->format('m/d/Y'),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,5 +13,6 @@ class TmdbResult
|
||||
public ?string $year = "",
|
||||
public ?string $mediaType = "",
|
||||
public ?array $episodes = null,
|
||||
public ?string $episodeAirDate = null,
|
||||
) {}
|
||||
}
|
||||
|
||||
@@ -15,11 +15,7 @@
|
||||
</template>
|
||||
</turbo-stream>
|
||||
|
||||
<turbo-stream action="prepend" target="alert_list">
|
||||
<template>
|
||||
<twig:Alert title="Success" message="{{ entity.title }} has been added to the Download queue" alert_id="{{ entity.id }}" data-controller="alert" />
|
||||
</template>
|
||||
</turbo-stream>
|
||||
<twig:Alert title="Success" message="{{ entity.title }} has been added to the Download queue" alert_id="{{ entity.id }}" data-controller="alert" />
|
||||
{% endblock %}
|
||||
|
||||
{% block update %}
|
||||
|
||||
@@ -4,11 +4,13 @@
|
||||
<div class="flex flex-col gap-4 grow">
|
||||
<h4 class="text-md font-bold">{{ results.episode }}. {{ results.media.title }}</h4>
|
||||
<p>{{ results.media.description }}</p>
|
||||
<span>
|
||||
<div>
|
||||
<small class="py-1 px-1.5 grow-0 font-bold 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') }}>{{ results.results|length }}</span> results</small>
|
||||
</span>
|
||||
<small class="py-1 px-1.5 grow-0 font-bold bg-gray-700 rounded-lg font-normal text-white" title="Air date {{ results.media.episodeAirDate }}"
|
||||
>{{ results.media.episodeAirDate }}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col gap-4 justify-between">
|
||||
<input type="checkbox"
|
||||
|
||||
Reference in New Issue
Block a user