aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2010-07-28 18:53:26 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2010-07-28 18:53:26 +0200
commit1259a21fc0b211f00e8bb422dafb2118caef79ef (patch)
tree04d87ed1f32cc7a9cc5653251ce9751bf9dd88f5
parentExtra settings stub in example file. (diff)
downloadoldgen-zmusic-1259a21fc0b211f00e8bb422dafb2118caef79ef.tar.xz
oldgen-zmusic-1259a21fc0b211f00e8bb422dafb2118caef79ef.zip
Don't flush with ob flush and check for null disc.
-rw-r--r--updater/updatedatabase.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/updater/updatedatabase.php b/updater/updatedatabase.php
index fab9801..374254a 100644
--- a/updater/updatedatabase.php
+++ b/updater/updatedatabase.php
@@ -65,7 +65,6 @@ function processFile($file)
global $addCount;
global $updateCount;
- ob_flush();
flush();
$format = getFormat($file);
@@ -122,7 +121,10 @@ function processFile($file)
$discString = $tags["disc"];
$discString = explode("/", $discString);
$disc = nullInt((int)$discString[0]);
- $discTotal = nullInt((int)$discString[1]);
+ if (count($discString) < 2)
+ $discTotal = "NULL";
+ else
+ $discTotal = nullInt((int)$discString[1]);
$genre = nullString($tags["genre"]);
$bpm = nullInt((int)$tags["bpm"]);
$composer = nullString($tags["composer"]);