Fix albums with same name

This commit is contained in:
angelblue05 2016-01-01 23:24:28 -06:00
parent 227bb3eb42
commit 77de12bec8
1 changed files with 10 additions and 22 deletions

View File

@ -1047,18 +1047,6 @@ class Kodidb_Functions():
"WHERE strMusicBrainzAlbumID = ?" "WHERE strMusicBrainzAlbumID = ?"
)) ))
cursor.execute(query, (musicbrainz,)) cursor.execute(query, (musicbrainz,))
try:
albumid = cursor.fetchone()[0]
except TypeError:
# Verify by name
query = ' '.join((
"SELECT idAlbum",
"FROM album",
"WHERE strAlbum = ?",
"COLLATE NOCASE"
))
cursor.execute(query, (name,))
try: try:
albumid = cursor.fetchone()[0] albumid = cursor.fetchone()[0]
except TypeError: except TypeError: