Fixed db referenced before assignment in library scan

This commit is contained in:
Remy
2011-08-19 23:43:58 -07:00
parent 4773711e0f
commit 275a6c2e04

View File

@@ -8,6 +8,8 @@ from headphones import db, logger, helpers, importer
def libraryScan(dir=None):
myDB = db.DBConnection()
# Clean up bad filepaths
tracks = myDB.select('SELECT Location, TrackID from tracks WHERE Location IS NOT NULL')
@@ -27,8 +29,7 @@ def libraryScan(dir=None):
new_artists = []
bitrates = []
myDB = db.DBConnection()
myDB.action('DELETE from have')
for r,d,f in os.walk(dir):