We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit eba616e7 authored by P. J. McDermott's avatar P. J. McDermott

Merge branch 'master' into code-cleanup

Conflicts:
	nixtape/radio/radio-utils.php
parents 4fd70366 78a3a27b
......@@ -248,13 +248,14 @@ function get_artist_selection($artists, $artist = false) {
*/
function get_loved_tracks($users) {
global $adodb;
$userclause = '';
$userclause = '( ';
for ($i = 0; $i < count($users); $i++) {
$userclause .= 'Loved_Tracks.userid = ' . $users[$i];
if ($i < count($users) - 1) {
$userclause .= ' OR ';
}
}
$userclause .= ' )';
return $adodb->CacheGetAll(7200, 'SELECT Track.name, Track.artist_name, Track.album_name, Track.duration, Track.streamurl FROM Track INNER JOIN Loved_Tracks ON Track.artist_name=Loved_Tracks.artist AND Track.name=Loved_Tracks.track WHERE ' . $userclause . ' AND Track.streamable=1');
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment