chore: remove unused code
This commit is contained in:
@@ -61,8 +61,8 @@ final class WebController extends AbstractController
|
|||||||
);
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// return $cache->get($cacheId, function (ItemInterface $item) use ($input, $request) {
|
return $cache->get($cacheId, function (ItemInterface $item) use ($input, $request) {
|
||||||
// $item->expiresAt(Carbon::now()->addHour()->setMinute(0)->setSecond(0));
|
$item->expiresAt(Carbon::now()->addHour()->setMinute(0)->setSecond(0));
|
||||||
$results = $this->getTvShowOptionsHandler->handle($input->toCommand());
|
$results = $this->getTvShowOptionsHandler->handle($input->toCommand());
|
||||||
|
|
||||||
if ($request->headers->get('Turbo-Frame')) {
|
if ($request->headers->get('Turbo-Frame')) {
|
||||||
@@ -72,7 +72,7 @@ final class WebController extends AbstractController
|
|||||||
return $this->render('torrentio/tvshows.html.twig', [
|
return $this->render('torrentio/tvshows.html.twig', [
|
||||||
'results' => $results,
|
'results' => $results,
|
||||||
]);
|
]);
|
||||||
// });
|
});
|
||||||
} catch (TorrentioRateLimitException $exception) {
|
} catch (TorrentioRateLimitException $exception) {
|
||||||
$this->broadcaster->alert('Warning', 'Torrentio has rate limited your requests. Please wait a few minutes before trying again.', 'warning');
|
$this->broadcaster->alert('Warning', 'Torrentio has rate limited your requests. Please wait a few minutes before trying again.', 'warning');
|
||||||
return $this->render('bare.html.twig',
|
return $this->render('bare.html.twig',
|
||||||
@@ -85,32 +85,6 @@ final class WebController extends AbstractController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Route('/torrentio/tvshows/clear/{tmdbId}/{imdbId}/{season?}/{episode?}', name: 'app_clear_torrentio_tvshows')]
|
|
||||||
public function clearTvShowOptions(GetTvShowOptionsInput $input, CacheInterface $cache, Request $request): Response
|
|
||||||
{
|
|
||||||
$cacheId = sprintf(
|
|
||||||
"page.torrentio.tvshows.%s.%s.%s.%s",
|
|
||||||
$input->tmdbId,
|
|
||||||
$input->imdbId,
|
|
||||||
$input->season,
|
|
||||||
$input->episode,
|
|
||||||
);
|
|
||||||
$cache->delete($cacheId);
|
|
||||||
|
|
||||||
$this->broadcaster->alert(
|
|
||||||
title: 'Success',
|
|
||||||
message: 'Torrentio cache Cleared.'
|
|
||||||
);
|
|
||||||
|
|
||||||
return $cache->get($cacheId, function (ItemInterface $item) use ($input) {
|
|
||||||
$item->expiresAt(Carbon::now()->addHour()->setMinute(0)->setSecond(0));
|
|
||||||
$results = $this->getTvShowOptionsHandler->handle($input->toCommand());
|
|
||||||
return $this->render('torrentio/tvshows.html.twig', [
|
|
||||||
'results' => $results,
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private function sendFragmentResponse(ResultInterface $result, Request $request): Response
|
private function sendFragmentResponse(ResultInterface $result, Request $request): Response
|
||||||
{
|
{
|
||||||
$request->setRequestFormat(TurboBundle::STREAM_FORMAT);
|
$request->setRequestFormat(TurboBundle::STREAM_FORMAT);
|
||||||
|
|||||||
Reference in New Issue
Block a user