public function __toString()
{
return sprintf("PLAYED:%s - ADDED:%s - DECK:%s - %s - %s - %s", $this->played ? '1' : '0', isset($this->added) ? $this->added ? '1' : '0' : 'X', $this->deck, $this->artist, $this->title, floor($this->playtime / 60) . ':' . $this->playtime % 60);
// debugging
$s = '';
foreach ($this->fields as $k => $v) {
$s .= "{$k} => {$v}\n";
}
return $s;
}