mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-20 02:25:31 +01:00
Fixed 'global name downloaded_track not defined' in importer.py - now uses track['Location']
This commit is contained in:
@@ -348,10 +348,10 @@ def updateFormat():
|
||||
logger.info('Finding media format for %s files' % len(tracks))
|
||||
for track in tracks:
|
||||
try:
|
||||
f = MediaFile(track['Location'])
|
||||
except Exception, e:
|
||||
logger.info("Exception from MediaFile for: " + downloaded_track + " : " + str(e))
|
||||
continue
|
||||
f = MediaFile(track['Location'])
|
||||
except Exception, e:
|
||||
logger.info("Exception from MediaFile for: " + track['Location'] + " : " + str(e))
|
||||
continue
|
||||
controlValueDict = {"TrackID": track['TrackID']}
|
||||
newValueDict = {"Format": f.format}
|
||||
myDB.upsert("tracks", newValueDict, controlValueDict)
|
||||
@@ -361,10 +361,10 @@ def updateFormat():
|
||||
logger.info('Finding media format for %s files' % len(havetracks))
|
||||
for track in havetracks:
|
||||
try:
|
||||
f = MediaFile(track['Location'])
|
||||
except Exception, e:
|
||||
logger.info("Exception from MediaFile for: " + downloaded_track + " : " + str(e))
|
||||
continue
|
||||
f = MediaFile(track['Location'])
|
||||
except Exception, e:
|
||||
logger.info("Exception from MediaFile for: " + track['Location'] + " : " + str(e))
|
||||
continue
|
||||
controlValueDict = {"TrackID": track['TrackID']}
|
||||
newValueDict = {"Format": f.format}
|
||||
myDB.upsert("have", newValueDict, controlValueDict)
|
||||
|
||||
Reference in New Issue
Block a user