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

Commit b8e676c5 authored by clint's avatar clint

cache new album query

parent b29b2e8c
......@@ -77,13 +77,13 @@ function createAlbumIfNew($artist, $album) {
global $adodb;
try {
$res = $adodb->Execute("SELECT name FROM Album WHERE name = " . ($album) . " AND artist_name = " . ($artist));
$name = $adodb->CacheGetOne(600, "SELECT name FROM Album WHERE name = " . ($album) . " AND artist_name = " . ($artist));
}
catch (exception $e) {
die("FAILED alb " . $e->getMessage() . "\n");
}
if(!$res) {
if(!$name) {
// Album doesn't exist, so create it
$art = $adodb->qstr(getAlbumArt($artist, $album));
......
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