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; - } }