Fixed minor issue where manual 'have' tracks would be unmatched if a local file was deleted.

This commit is contained in:
theguardian
2013-10-23 17:31:21 -07:00
parent 8cd08401f5
commit 6ebd26ecfd

View File

@@ -61,7 +61,6 @@ def libraryScan(dir=None, append=False, ArtistID=None, ArtistName=None, cron=Fal
encoded_track_string = track['Location'].encode(headphones.SYS_ENCODING)
if not os.path.isfile(encoded_track_string):
myDB.action('DELETE FROM have WHERE Location=?', [track['Location']])
myDB.action('UPDATE have SET Matched=NULL WHERE Matched=?', [track['Matched']])
logger.info('File %s removed from Headphones, as it is no longer on disk' % encoded_track_string.decode(headphones.SYS_ENCODING, 'replace'))
###############myDB.action('DELETE from have')