Commit 95a02f81 authored by Mike Sheldon's avatar Mike Sheldon

Prefer streamable versions of a track where available

parent 0295f221
......@@ -51,7 +51,8 @@ class Track {
$adodb->SetFetchMode(ADODB_FETCH_ASSOC);
$res = $adodb->CacheGetRow(600, 'SELECT name, artist_name, album_name, duration, streamable, license, downloadurl, streamurl, mbid FROM Track WHERE '
. 'lower(name) = ' . strtolower($adodb->qstr($name)) . ' AND '
. 'lower(artist_name) = ' . strtolower($adodb->qstr($artist)));
. 'lower(artist_name) = ' . strtolower($adodb->qstr($artist))
. 'ORDER BY streamable DESC');
if(!$res) {
$this->name = 'No such track: ' . $name;
} else {
......
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