mirror of
https://github.com/AzuraCast/AzuraCast.git
synced 2024-06-17 22:47:04 +00:00
Provide a __toString for StationMedia and disable persist cascading.
This commit is contained in:
parent
513d04f7d2
commit
9b2721aba7
|
@ -201,7 +201,7 @@ class StationMedia
|
|||
protected $cue_out;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="StationPlaylistMedia", mappedBy="media", cascade={"persist"})
|
||||
* @ORM\OneToMany(targetEntity="StationPlaylistMedia", mappedBy="media")
|
||||
*
|
||||
* @DeepNormalize(true)
|
||||
* @Serializer\MaxDepth(1)
|
||||
|
@ -213,7 +213,7 @@ class StationMedia
|
|||
protected $playlists;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="StationMediaCustomField", mappedBy="media", cascade={"persist"})
|
||||
* @ORM\OneToMany(targetEntity="StationMediaCustomField", mappedBy="media")
|
||||
*
|
||||
* @var Collection
|
||||
*/
|
||||
|
@ -723,6 +723,14 @@ class StationMedia
|
|||
return $this->playlists;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string A string identifying this entity.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->unique_id.': '.$this->artist.' - '.$this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the API version of the object/array.
|
||||
*
|
||||
|
|
|
@ -238,7 +238,6 @@ class Media extends AbstractTask
|
|||
}
|
||||
}
|
||||
|
||||
$this->_flushAndClearRecords();
|
||||
$fs->flushAllCaches(true);
|
||||
|
||||
$this->logger->debug(sprintf('Media processed for station "%s".', $station->getName()), $stats);
|
||||
|
|
Loading…
Reference in New Issue
Block a user