mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-12 14:49:29 +01:00
Create alltracks when adding album
Potential fix for https://github.com/rembo10/headphones/issues/1586
This commit is contained in:
@@ -488,6 +488,7 @@ def addArtisttoDB(artistid, extrasonly=False, forcefull=False):
|
||||
if skip_log == 0:
|
||||
logger.info(u"[%s] No new releases, so no changes made to %s" % (artist['artist_name'], rg['title']))
|
||||
|
||||
time.sleep(3)
|
||||
finalize_update(artistid, artist['artist_name'], errors)
|
||||
|
||||
logger.info(u"Seeing if we need album art for: %s" % artist['artist_name'])
|
||||
@@ -666,6 +667,7 @@ def addReleaseById(rid, rgid=None):
|
||||
#myDB.action('DELETE from have WHERE Location=?', [match['Location']])
|
||||
|
||||
myDB.upsert("tracks", newValueDict, controlValueDict)
|
||||
myDB.upsert("alltracks", newValueDict, controlValueDict)
|
||||
|
||||
# Reset status
|
||||
if status == 'Loading':
|
||||
|
||||
@@ -378,6 +378,14 @@ class WebInterface(object):
|
||||
def deleteAlbum(self, AlbumID, ArtistID=None):
|
||||
logger.info(u"Deleting all traces of album: " + AlbumID)
|
||||
myDB = db.DBConnection()
|
||||
|
||||
namecheck = myDB.select('SELECT ArtistName, AlbumTitle from albums where AlbumID=?', [AlbumID])
|
||||
for name in namecheck:
|
||||
artist = name['ArtistName']
|
||||
album = name['AlbumTitle']
|
||||
|
||||
myDB.action('UPDATE have SET Matched=NULL WHERE ArtistName=? AND AlbumTitle=?', (artist, album))
|
||||
|
||||
myDB.action('DELETE from albums WHERE AlbumID=?', [AlbumID])
|
||||
myDB.action('DELETE from tracks WHERE AlbumID=?', [AlbumID])
|
||||
myDB.action('DELETE from allalbums WHERE AlbumID=?', [AlbumID])
|
||||
|
||||
Reference in New Issue
Block a user