mirror of
https://github.com/AzuraCast/AzuraCast.git
synced 2024-06-17 22:47:04 +00:00
Log the registered track for AutoDJ debugging.
This commit is contained in:
parent
6dc2526d54
commit
04756a0f87
|
@ -221,6 +221,14 @@ class Song
|
|||
return $this->history;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string A string identifying this entity.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return 'Song ' . $this->id . ': ' . $this->artist . ' - ' . $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the API version of the object/array.
|
||||
*
|
||||
|
|
|
@ -325,7 +325,7 @@ class SongHistory
|
|||
if (null === $cued || 0 === $cued) {
|
||||
$this->setTimestampCued(time());
|
||||
}
|
||||
|
||||
|
||||
$this->sent_to_autodj = true;
|
||||
}
|
||||
|
||||
|
@ -559,4 +559,11 @@ class SongHistory
|
|||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
return (null !== $this->media)
|
||||
? (string)$this->media
|
||||
: (string)$this->song;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@ namespace App\Entity;
|
|||
|
||||
use App\Annotations\AuditLog;
|
||||
use App\ApiUtilities;
|
||||
use App\Radio\Backend\Liquidsoap;
|
||||
use App\Normalizer\Annotation\DeepNormalize;
|
||||
use App\Radio\Backend\Liquidsoap;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
@ -795,7 +795,7 @@ class StationMedia
|
|||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->unique_id . ': ' . $this->artist . ' - ' . $this->title;
|
||||
return 'StationMedia ' . $this->unique_id . ': ' . $this->artist . ' - ' . $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,7 +8,7 @@ class GetNextSong extends Event
|
|||
{
|
||||
/** @var null|string|Entity\SongHistory The next song, if it's already calculated. */
|
||||
protected $next_song;
|
||||
|
||||
|
||||
protected Entity\Station $station;
|
||||
|
||||
public function __construct(Entity\Station $station)
|
||||
|
@ -56,4 +56,11 @@ class GetNextSong extends Event
|
|||
{
|
||||
return $this->station;
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
return (null !== $this->next_song)
|
||||
? (string)$this->next_song
|
||||
: 'No Song';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -321,7 +321,9 @@ class AutoDJ implements EventSubscriberInterface
|
|||
|
||||
if ($event->setNextSong($this->playSongFromPlaylist($playlist, $cued_song_history,
|
||||
$preferredMode))) {
|
||||
$this->logger->info('Playable track found and registered.');
|
||||
$this->logger->info('Playable track found and registered.', [
|
||||
'next_song' => (string)$event,
|
||||
]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user