Fix feed for podcasts other than the 1st…

This commit is contained in:
dece 2023-05-15 10:09:52 +02:00
parent cb21eafa43
commit b25959b935
3 changed files with 2 additions and 12 deletions

View file

@ -31,11 +31,12 @@ class FeedController extends AbstractController
#[Route('/podcasts/{slug}/feed', name: 'app_podcast_feed')] #[Route('/podcasts/{slug}/feed', name: 'app_podcast_feed')]
public function podcastFeed( public function podcastFeed(
string $slug,
PodcastRepository $podcastRepository, PodcastRepository $podcastRepository,
FeedService $feedService FeedService $feedService
): Response ): Response
{ {
$podcast = $podcastRepository->find(1); $podcast = $podcastRepository->findOneBy(['slug' => $slug]);
if ($podcast === null) if ($podcast === null)
return $this->render('404.html.twig'); return $this->render('404.html.twig');

View file

@ -177,13 +177,4 @@ class Podcast
return $this; return $this;
} }
public function getLogoUrl(): ?string
{
if ($this->logoFilename === null) {
return null;
}
return Constants::IMAGES_BASE_PATH . $this->logoFilename;
}
} }

View file

@ -2,8 +2,6 @@
namespace App\Service; namespace App\Service;
use App\Entity\Episode;
use App\Entity\Podcast;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
class DownloadService class DownloadService