Fix feed for podcasts other than the 1st…
This commit is contained in:
parent
cb21eafa43
commit
b25959b935
|
@ -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');
|
||||||
|
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue