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

Commit 6763b59f authored by clint's avatar clint

try mb links in nowplaying cards

parent b0cf8a7c
......@@ -72,9 +72,9 @@ class Server {
global $mdb2;
if($username) {
$res = $mdb2->query('SELECT username, artist, track, client, ClientCodes.name, ClientCodes.url from Now_Playing LEFT OUTER JOIN Scrobble_Sessions ON Now_Playing.sessionid=Scrobble_Sessions.sessionid LEFT OUTER JOIN ClientCodes ON Scrobble_Sessions.client=ClientCodes.code WHERE username = ' . $mdb2->quote($username, "text") . ' ORDER BY Now_Playing.expires DESC LIMIT ' . $mdb2->quote($number, "integer"));
$res = $mdb2->query('SELECT username, artist, track, client, ClientCodes.name, ClientCodes.url, Now_Playing.mbid from Now_Playing LEFT OUTER JOIN Scrobble_Sessions ON Now_Playing.sessionid=Scrobble_Sessions.sessionid LEFT OUTER JOIN ClientCodes ON Scrobble_Sessions.client=ClientCodes.code WHERE username = ' . $mdb2->quote($username, "text") . ' ORDER BY Now_Playing.expires DESC LIMIT ' . $mdb2->quote($number, "integer"));
} else {
$res = $mdb2->query('SELECT username, artist, track, client, ClientCodes.name, ClientCodes.url from Now_Playing LEFT OUTER JOIN Scrobble_Sessions ON Now_Playing.sessionid=Scrobble_Sessions.sessionid LEFT OUTER JOIN ClientCodes ON Scrobble_Sessions.client=ClientCodes.code ORDER BY Now_Playing.expires DESC LIMIT ' . $mdb2->quote($number, "integer"));
$res = $mdb2->query('SELECT username, artist, track, client, ClientCodes.name, ClientCodes.url, Now_Playing.mbid from Now_Playing LEFT OUTER JOIN Scrobble_Sessions ON Now_Playing.sessionid=Scrobble_Sessions.sessionid LEFT OUTER JOIN ClientCodes ON Scrobble_Sessions.client=ClientCodes.code ORDER BY Now_Playing.expires DESC LIMIT ' . $mdb2->quote($number, "integer"));
}
if(PEAR::isError($res)) {
......
......@@ -12,7 +12,15 @@ musical tastes with other people.</p>
<dl>
<dt><a href="{$nowplaying[np].artisturl}">
{$nowplaying[np].artist|stripslashes|htmlspecialchars}</a></dt>
<dd>{$nowplaying[np].track|stripslashes|htmlspecialchars}</dd>
<dd>
{if $nowplaying[np].mbid <> ""}
<a href="http://musicbrainz.org/track/{$nowplaying[np].mbid}.html">
{/if}
{$nowplaying[np].track|stripslashes|htmlspecialchars}
{if $nowplaying[np].mbid <> ""}
</a>
{/if}
</dd>
<dd><a href="{$nowplaying[np].userurl}">{$nowplaying[np].username|stripslashes|htmlspecialchars}</a></dd>
<dd>{$nowplaying[np].clientstr}</dd>
</dl>
......
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