diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-06-08 09:29:29 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-06-08 09:29:29 +0000 |
commit | 4b4930e286690713ba83c2f18cff48bb652e7a0a (patch) | |
tree | 75fcf2ea0badf884a1a83c7e755482ee8b0791c8 /lib/class/catalog.class.php | |
parent | d5b8c6a6b70733d87d62904bcd65a8b94f477b40 (diff) | |
download | ampache-4b4930e286690713ba83c2f18cff48bb652e7a0a.tar.gz ampache-4b4930e286690713ba83c2f18cff48bb652e7a0a.tar.bz2 ampache-4b4930e286690713ba83c2f18cff48bb652e7a0a.zip |
make the verify remove dead songs and tweak single song view a tiny bit
Diffstat (limited to 'lib/class/catalog.class.php')
-rw-r--r-- | lib/class/catalog.class.php | 5 |
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 |