From a86f2e3fbe5cacaeb7d653e20576eb6a4d43e98b Mon Sep 17 00:00:00 2001 From: Mischa Spelt Date: Sun, 3 May 2020 16:41:20 +0200 Subject: [PATCH] Nieuwsopener e.d. weergave gefixt --- common/classes/Track.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/common/classes/Track.php b/common/classes/Track.php index ca05bfe..ced4269 100644 --- a/common/classes/Track.php +++ b/common/classes/Track.php @@ -9,6 +9,7 @@ class Track extends Model { public $artist; public $duration; public $ends; + public $isLayout; public function __construct($data) { parent::__construct($data); @@ -22,6 +23,9 @@ class Track extends Model { if(strlen($this->itemCode) > 0 && ($this->itemCode[0] == 'V')) { foreach(self::$IDENTS as $ident => $display) { if(substr($this->itemCode, 0, strlen($ident)) == $ident || substr($this->title, 0, strlen($ident)) == $ident) { + $this->title = $display; + $this->artist = ""; + $this->itemCode = '_' . $this->itemCode; return false; } } @@ -39,14 +43,4 @@ class Track extends Model { public function secondsRemaining() { return ($this->ends) ? ($this->ends->getTimestamp() - time()) : -1; } - - public function display() { - foreach(self::$IDENTS as $ident => $display) { - if(substr($this->itemCode, 0, strlen($ident)) == $ident || substr($this->title, 0, strlen($ident)) == $ident) { - return $display; - } - } - - return $this->artist . ($this->artist ? ' - ' : '') . $this->title; - } }