Nieuwsopener e.d. weergave gefixt
This commit is contained in:
@@ -9,6 +9,7 @@ class Track extends Model {
|
|||||||
public $artist;
|
public $artist;
|
||||||
public $duration;
|
public $duration;
|
||||||
public $ends;
|
public $ends;
|
||||||
|
public $isLayout;
|
||||||
|
|
||||||
public function __construct($data) {
|
public function __construct($data) {
|
||||||
parent::__construct($data);
|
parent::__construct($data);
|
||||||
@@ -22,6 +23,9 @@ class Track extends Model {
|
|||||||
if(strlen($this->itemCode) > 0 && ($this->itemCode[0] == 'V')) {
|
if(strlen($this->itemCode) > 0 && ($this->itemCode[0] == 'V')) {
|
||||||
foreach(self::$IDENTS as $ident => $display) {
|
foreach(self::$IDENTS as $ident => $display) {
|
||||||
if(substr($this->itemCode, 0, strlen($ident)) == $ident || substr($this->title, 0, strlen($ident)) == $ident) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -39,14 +43,4 @@ class Track extends Model {
|
|||||||
public function secondsRemaining() {
|
public function secondsRemaining() {
|
||||||
return ($this->ends) ? ($this->ends->getTimestamp() - time()) : -1;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user