Fix bug with playlist mapping.

This commit is contained in:
Buster Neece 2024-02-22 18:33:00 -06:00
parent e3dfe85653
commit df3f9c5b85
No known key found for this signature in database
2 changed files with 13 additions and 5 deletions

View File

@ -46,11 +46,17 @@
target="_blank"
>{{ $gettext('RSS Feed') }}</a>
</div>
<div
v-else
class="badges"
>
<span class="badge text-bg-info">
<div class="badges">
<span
v-if="item.source === 'playlist'"
class="badge text-bg-info"
>
{{ $gettext('Playlist-Based') }}
</span>
<span
v-if="!item.is_published"
class="badge text-bg-info"
>
{{ $gettext('Unpublished') }}
</span>
</div>

View File

@ -5,6 +5,7 @@ declare(strict_types=1);
namespace App\Entity;
use App\Entity\Enums\PodcastSources;
use App\Normalizer\Attributes\DeepNormalize;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
@ -29,6 +30,7 @@ class Podcast implements Interfaces\IdentifiableEntityInterface
#[ORM\Column(nullable: false, insertable: false, updatable: false)]
protected int $storage_location_id;
#[DeepNormalize(true)]
#[ORM\ManyToOne(inversedBy: 'podcasts')]
#[ORM\JoinColumn(name: 'playlist_id', referencedColumnName: 'id', nullable: true, onDelete: 'CASCADE')]
protected ?StationPlaylist $playlist = null;