summaryrefslogtreecommitdiffstats
path: root/lib/class
diff options
context:
space:
mode:
Diffstat (limited to 'lib/class')
-rw-r--r--lib/class/catalog.class.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php
index 02ff5280..c4cf70e0 100644
--- a/lib/class/catalog.class.php
+++ b/lib/class/catalog.class.php
@@ -1717,7 +1717,10 @@ class Catalog {
else {
Error::add('general',"$song->file does not exist or is not readable");
- debug_event('read-error',"$song->file does not exist or is not readable",'5','ampache-catalog');
+ debug_event('read-error',"$song->file does not exist or is not readable, removing",'5','ampache-catalog');
+ // Let's go ahead and remove it!
+ $sql = "DELETE FROM `song` WHERE `id`='" . Dba::escape($song->id) . "'";
+ $del_results = Dba::query($sql);
}
} //end foreach