Show a logo for podcasts
This commit is contained in:
parent
bd12da0a7f
commit
bcad3d8493
|
@ -176,4 +176,13 @@ class Podcast
|
|||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLogoUrl(): ?string
|
||||
{
|
||||
if ($this->logoFilename === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Constants::IMAGES_BASE_PATH . $this->logoFilename;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,11 @@ class FeedService
|
|||
$titleElement->appendChild(new DOMText($podcast->getName()));
|
||||
$channelElement->appendChild(new DOMElement('description', $podcast->getDescription()));
|
||||
$channelElement->appendChild(new DOMElement('link', $podcast->getWebsite()));
|
||||
$imageElement = new DOMElement('image');
|
||||
$imageElement->appendChild(new DOMElement('url', $podcast->getLogoUrl()));
|
||||
$imageElement->appendChild(new DOMElement('title', 'logo'));
|
||||
$imageElement->appendChild(new DOMElement('link', $podcast->getWebsite()));
|
||||
$channelElement->appendChild($imageElement);
|
||||
|
||||
$episodes = $this->entityManager->createQuery(
|
||||
'SELECT e FROM App\Entity\Episode e'
|
||||
|
|
Loading…
Reference in a new issue