From 865991145734a6b6445be3d0d4a8f269fcab2783 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Sun, 6 Jul 2025 16:53:38 +0200 Subject: [PATCH] dirty hack for team events --- app/Models/Episode.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/Models/Episode.php b/app/Models/Episode.php index e0789a8..df2418a 100644 --- a/app/Models/Episode.php +++ b/app/Models/Episode.php @@ -38,7 +38,9 @@ class Episode extends Model public function getScheduledEventName(): string { $parts = []; - if (count($this->players) > 1) { + if (count($this->players) == 4) { + // $parts[] = $this->players[0]->getName().' and '.$this->players[2]->getName().' vs '.$this->players[1]->getName().' and '.$this->players[3]->getName(); + } elseif (count($this->players) > 1) { $players = []; foreach ($this->players as $player) { $players[] = $player->getName(); @@ -55,10 +57,15 @@ class Episode extends Model } public function getScheduledEventDescription(): string { + $description = ''; + if (count($this->players) == 4) { + $description .= $this->players[0]->getName().' and '.$this->players[2]->getName() + .' vs '.$this->players[1]->getName().' and '.$this->players[3]->getName()."\n"; + } if ($this->comment != '') { - return $this->comment; + $description .= $this->comment."\n"; } - return ''; + return $description; } public function getRestreamLink(string $preferred_lang = ''): string { -- 2.39.5