From b25959b9355ab12a15da7e4cdb03df7cc917e95a Mon Sep 17 00:00:00 2001 From: dece Date: Mon, 15 May 2023 10:09:52 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20feed=20for=20podcasts=20other=20than=20th?= =?UTF-8?q?e=201st=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Controller/FeedController.php | 3 ++- src/Entity/Podcast.php | 9 --------- src/Service/DownloadService.php | 2 -- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Controller/FeedController.php b/src/Controller/FeedController.php index be9c140..c4fda53 100644 --- a/src/Controller/FeedController.php +++ b/src/Controller/FeedController.php @@ -31,11 +31,12 @@ class FeedController extends AbstractController #[Route('/podcasts/{slug}/feed', name: 'app_podcast_feed')] public function podcastFeed( + string $slug, PodcastRepository $podcastRepository, FeedService $feedService ): Response { - $podcast = $podcastRepository->find(1); + $podcast = $podcastRepository->findOneBy(['slug' => $slug]); if ($podcast === null) return $this->render('404.html.twig'); diff --git a/src/Entity/Podcast.php b/src/Entity/Podcast.php index 8463e87..827b074 100644 --- a/src/Entity/Podcast.php +++ b/src/Entity/Podcast.php @@ -177,13 +177,4 @@ class Podcast return $this; } - - public function getLogoUrl(): ?string - { - if ($this->logoFilename === null) { - return null; - } - - return Constants::IMAGES_BASE_PATH . $this->logoFilename; - } } diff --git a/src/Service/DownloadService.php b/src/Service/DownloadService.php index 4bb25f9..1e580b3 100644 --- a/src/Service/DownloadService.php +++ b/src/Service/DownloadService.php @@ -2,8 +2,6 @@ namespace App\Service; -use App\Entity\Episode; -use App\Entity\Podcast; use Psr\Log\LoggerInterface; class DownloadService