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

Commit 81b56713 authored by clint's avatar clint

rearrange this because I don't know why the album isn't being added

parent b8e676c5
......@@ -85,24 +85,25 @@ function createAlbumIfNew($artist, $album) {
if(!$name) {
// Album doesn't exist, so create it
$art = $adodb->qstr(getAlbumArt($artist, $album));
try {
if ($art !="") {
$license = $adodb->qstr("amazon");
$art = $adodb->qstr(getAlbumArt($artist, $album));
$res = $adodb->Execute("INSERT INTO Album (name, artist_name, image, artwork_license) VALUES (" . ($album) . ", " . ($artist) . ", " . ($art) . ", " . ($license) .")");
if ($art !="") {
$license = $adodb->qstr("amazon");
} else {
$sql = "INSERT INTO Album (name, artist_name, image, artwork_license) VALUES (" . ($album) . ", " . ($artist) . ", " . ($art) . ", " . ($license) .")";
$res = $adodb->Execute("INSERT INTO Album (name, artist_name) VALUES (" . ($album) . ", " . ($artist) . ")");
} else {
}
}
catch (exception $e) {
die("FAILED albc " . $e->getMessage() . "\n");
}
$sql = "INSERT INTO Album (name, artist_name) VALUES (" . ($album) . ", " . ($artist) . ")";
}
try {
$adodb->Execute($sql);
}
catch (exception $e) {
die("FAILED albc " . $e->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