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

Commit 49420171 authored by clint's avatar clint

only strtolower fields that are set

parent 916194a5
......@@ -131,7 +131,10 @@ function getTrackCreateIfNew($artist, $album, $track, $mbid) {
function getScrobbleTrackCreateIfNew($artist, $album, $track, $mbid, $tid) {
global $mdb2;
$res = $mdb2->query("SELECT id FROM Scrobble_Track WHERE name = " . (strtolower($track)) . " AND artist = " . (strtolower($artist)) . " AND album = " . strtolower($album) . " AND mbid = " . strtolower($mbid));
if($album) { $album = strtolower($album); }
if($mbid) { $mbid = strtolower($mbid); }
$res = $mdb2->query("SELECT id FROM Scrobble_Track WHERE name = " . (strtolower($track)) . " AND artist = " . (strtolower($artist)) . " AND album = " . ($album) . " AND mbid = " . ($mbid));
if(PEAR::isError($res)) {
die("FAILED " . $res->getMessage() . "\n");
}
......
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