mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-20 02:25:31 +01:00
Fixed a few minor bugs where library scan would overwrite cleanname of
manually matched track & delete artist would fail.
This commit is contained in:
@@ -138,8 +138,7 @@ def libraryScan(dir=None, append=False, ArtistID=None, ArtistName=None, cron=Fal
|
||||
if not check_exist_song:
|
||||
myDB.upsert("have", newValueDict, controlValueDict)
|
||||
new_song_count+=1
|
||||
#We're going to have to think about metadata changing, and setting Matched = None when/if we do
|
||||
elif check_exist_song['CleanName'] != CleanName and check_exist_song['Matched'] != "Manual":
|
||||
elif check_exist_song['ArtistName'] != f_artist or check_exist_song['AlbumTitle'] != f.album or check_exist_song['TrackTitle'] != f.title:
|
||||
newValueDict['Matched'] = None
|
||||
myDB.upsert("have", newValueDict, controlValueDict)
|
||||
new_song_count+=1
|
||||
|
||||
@@ -191,7 +191,9 @@ class WebInterface(object):
|
||||
def deleteArtist(self, ArtistID):
|
||||
logger.info(u"Deleting all traces of artist: " + ArtistID)
|
||||
myDB = db.DBConnection()
|
||||
artistname = myDB.select('SELECT ArtistName from artists where ArtistID=?', [ArtistID]).fetchone()
|
||||
namecheck = myDB.select('SELECT ArtistName from artists where ArtistID=?', [ArtistID])
|
||||
for name in namecheck:
|
||||
artistname=name['ArtistName']
|
||||
myDB.action('DELETE from artists WHERE ArtistID=?', [ArtistID])
|
||||
myDB.action('DELETE from albums WHERE ArtistID=?', [ArtistID])
|
||||
myDB.action('DELETE from tracks WHERE ArtistID=?', [ArtistID])
|
||||
@@ -451,7 +453,7 @@ class WebInterface(object):
|
||||
update_count+=1
|
||||
#This was throwing errors and I don't know why, but it seems to be working fine.
|
||||
#else:
|
||||
#logger.info("There was an error modifying Artist %s / Album %s. This should not have happened" % (existing_artist, existing_album))
|
||||
#logger.info("There was an error modifying Artist %s / Album %s with clean name %s" % (existing_artist, existing_album, existing_clean_string))
|
||||
logger.info("Manual matching yielded %s new matches for Artist %s / Album %s" % (update_count, new_artist, new_album))
|
||||
if update_count > 0:
|
||||
librarysync.update_album_status()
|
||||
|
||||
Reference in New Issue
Block a user