diff --git a/headphones/librarysync.py b/headphones/librarysync.py index 03925d7b..6af6c4fb 100644 --- a/headphones/librarysync.py +++ b/headphones/librarysync.py @@ -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 diff --git a/headphones/webserve.py b/headphones/webserve.py index 974777c9..784ef20e 100644 --- a/headphones/webserve.py +++ b/headphones/webserve.py @@ -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()