mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-20 10:35:32 +01:00
Fixed weird indentation error in updater.py that caused daemon to hang.
This commit is contained in:
@@ -19,19 +19,18 @@ from headphones import logger, db, importer
|
||||
|
||||
def dbUpdate(forcefull=False):
|
||||
|
||||
logger.info('Starting update for %i active artists' % len(activeartists))
|
||||
|
||||
myDB = db.DBConnection()
|
||||
logger.info('Starting update for %i active artists' % len(activeartists))
|
||||
|
||||
#This can be updated to NOT include: paused artists, artists with extras enabled, wanted albums, albums matched to specific releases, etc
|
||||
#But it absolutely FLIES if these dB's are destroyed in their entirety. With the new system, there's really no need to pause artists.
|
||||
if forcefull==True:
|
||||
myDB.select('DELETE from albums')
|
||||
myDB.select('DELETE from allalbums')
|
||||
myDB.select('DELETE from tracks')
|
||||
myDB.select('DELETE from alltracks')
|
||||
myDB.select('DELETE from descriptions')
|
||||
myDB.select('UPDATE artists SET LatestAlbum=?, ReleaseDate=?, AlbumID=?, HaveTracks=?, TotalTracks=?', [None, None, None, None, None])
|
||||
myDB.select('DELETE from albums')
|
||||
myDB.select('DELETE from allalbums')
|
||||
myDB.select('DELETE from tracks')
|
||||
myDB.select('DELETE from alltracks')
|
||||
myDB.select('DELETE from descriptions')
|
||||
myDB.select('UPDATE artists SET LatestAlbum=?, ReleaseDate=?, AlbumID=?, HaveTracks=?, TotalTracks=?', [None, None, None, None, None])
|
||||
|
||||
activeartists = myDB.select('SELECT ArtistID, ArtistName from artists WHERE Status="Active" or Status="Loading" order by LastUpdated ASC')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user