Mastacheata wrote:
There should be a setting in the config file which songtypes will be shown.
The exact way to find that depends on the Version of the templates you're using.
Thank you for the reply.
It seems that the only file that displays this is class.song.php.
It only asks for songtype on coming songs (line 33), recent songs (line 72) and playlist songs (line 172).
I edited these 3 sections but no changes happen.
Original code:
Code:
public static function getComingSongs() {
$db = Database::getInstance();
// Return tracks in the queuelist table
$select = $db->select()
->from(array('s' => 'songlist'),
array('*'))
->join(array('q' => 'queuelist'),
'q.songID = s.ID',
array('requestID'))
->where('s.songtype = ?', 'S') //Only return song of type S
->order('q.sortID ASC')
->limit(COMING_UP_COUNT);
$songs = array();
try {
$songs = $db->fetchAll($select);
} catch (Zend_Db_Adapter_Exception $ex) {
echo "Please verify database settings.<br />";
exit;
}
$comingSongs = array();
foreach ($songs as $songKey => $song) {
$comingSongs[$songKey] = new self();
$comingSongs[$songKey]->setValues($song);
}
return $comingSongs;
}
I changed that top original code to this:
Code:
public static function getComingSongs() {
$db = Database::getInstance();
// Return tracks in the queuelist table
$select = $db->select()
->from(array('s' => 'songlist'),
array('*'))
->join(array('q' => 'queuelist'),
'q.songID = s.ID',
array('requestID'))
->where('s.songtype = ?', 'S', 'A', 'N', 'V') //Should return song of type S, A, N, V
->order('q.sortID ASC')
->limit(COMING_UP_COUNT);
$songs = array();
try {
$songs = $db->fetchAll($select);
} catch (Zend_Db_Adapter_Exception $ex) {
echo "Please verify database settings.<br />";
exit;
}
$comingSongs = array();
foreach ($songs as $songKey => $song) {
$comingSongs[$songKey] = new self();
$comingSongs[$songKey]->setValues($song);
}
return $comingSongs;
}
And nothing happens on the coming, recent or playlist pages.
Would there be any other place that this is coming from that is not from this class.song.php file?
Also, the currentsong php code in this file has no section asking for songtype.
This is all it shows for current song... nothing mentioned on songtype...
Code:
public static function getCurrentSong() {
if (count(self::$songs) == 0) {
self::getRecentSongs();
}
reset(self::$songs);
return current(self::$songs);
}
FYI, in my dbconfig.xml.php file, it shows me using version 3.4.2 of the template. I am guessing it should be the most recent since I reinstalled SAM to the latest and these files are what are in the install.