Manage Unmatched fix

Potential fix for https://github.com/rembo10/headphones/issues/1808
This commit is contained in:
Ade
2014-08-15 20:16:26 +12:00
parent e0f51f756c
commit d037147c23

View File

@@ -460,8 +460,9 @@ class WebInterface(object):
have_album_dictionary.append(have_dict)
headphones_albums = myDB.select('SELECT ArtistName, AlbumTitle from albums ORDER BY ArtistName')
for albums in headphones_albums:
headphones_dict = { 'ArtistName' : albums['ArtistName'], 'AlbumTitle' : albums['AlbumTitle'] }
headphones_album_dictionary.append(headphones_dict)
if albums['ArtistName'] and albums['AlbumTitle']:
headphones_dict = { 'ArtistName' : albums['ArtistName'], 'AlbumTitle' : albums['AlbumTitle'] }
headphones_album_dictionary.append(headphones_dict)
#unmatchedalbums = [f for f in have_album_dictionary if f not in [x for x in headphones_album_dictionary]]
check = set([(cleanName(d['ArtistName']).lower(), cleanName(d['AlbumTitle']).lower()) for d in headphones_album_dictionary])