summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-11-04 06:57:01 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-11-04 06:57:01 +0000
commitb7436c2fba721bdb0f1cccd85c0331df4fe6fab1 (patch)
tree35a017a7ed678aefebd9ff6498d6933bf74e74bf /lib
parentb79ae26d4f0ee699a8b6fc981db979c022abbb3e (diff)
downloadampache-b7436c2fba721bdb0f1cccd85c0331df4fe6fab1.tar.gz
ampache-b7436c2fba721bdb0f1cccd85c0331df4fe6fab1.tar.bz2
ampache-b7436c2fba721bdb0f1cccd85c0331df4fe6fab1.zip
added debug to catalog update process
Diffstat (limited to 'lib')
-rw-r--r--lib/class/catalog.class.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php
index 11085bf8..7b96b9df 100644
--- a/lib/class/catalog.class.php
+++ b/lib/class/catalog.class.php
@@ -797,6 +797,9 @@ class Catalog {
*/
function update_song_from_tags($song) {
+
+ if (conf('debug')) { log_event($_SESSION['userdata']['username'],' update-check ',"Starting work on $song->file",'ampache-catalog'); }
+
$info = new Audioinfo();
$results = $info->Info($song->file);
@@ -843,8 +846,12 @@ class Catalog {
$info = $song->compare_song_information($song,$new_song);
if ($info['change']) {
+ if (conf('debug')) { log_event($_SESSION['userdata']['username'],' update ',"$song->file difference found, updating database",'ampache-catalog'); }
$song->update_song($song->id,$new_song);
}
+ else {
+ if (conf('debug')) { log_event($_SESSION['userdata']['username'],' update ',"$song->file no difference found returning",'ampache-catalog'); }
+ }
return $info;
@@ -1447,8 +1454,11 @@ class Catalog {
*/
while ($results = mysql_fetch_object($db_results)) {
+ /* Create the object from the existing database information */
$song = new Song($results->id);
+ if (conf('debug')) { log_event($_SESSION['userdata']['username'],' verify ',"Starting work on $song->file",'ampache-catalog'); }
+
if (is_readable($song->file)) {
unset($skip);
@@ -1497,6 +1507,10 @@ class Catalog {
} // end skip
+ if ($skip) {
+ if (conf('debug')) { log_event($_SESSION['userdata']['username'],' skip ',"$song->file has been skipped due to newer local update or file mod time",'ampache-catalog'); }
+ }
+
/* Stupid little cutesie thing */
$this->count++;
if ( !($this->count%conf('catalog_echo_count')) ) {
@@ -1510,6 +1524,9 @@ class Catalog {
echo "<dl>\n <li>";
echo "<b>$song->file does not exist or is not readable</b>\n";
echo " </li>\n</dl>\n<hr align=\"left\" width=\"50%\" />\n";
+
+ if (conf('debug')) { log_event($_SESSION['userdata']['username'],' read-error ',"$song->file does not exist or is not readable",'ampache-catalog'); }
+
// Should we remove it from catalog?
}