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