From a988d418efbc255b3ef09b263429d8ea0b41c1c1 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Thu, 13 Sep 2018 02:39:01 -0500 Subject: [PATCH] Small music fix --- resources/lib/objects/kodi/music.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/lib/objects/kodi/music.py b/resources/lib/objects/kodi/music.py index 98bf56e2..3e1db882 100644 --- a/resources/lib/objects/kodi/music.py +++ b/resources/lib/objects/kodi/music.py @@ -126,14 +126,18 @@ class Music(Kodi): try: if musicbrainz is not None: self.cursor.execute(QU.get_album, (musicbrainz,)) + album = None else: self.cursor.execute(QU.get_album_by_name, (name,)) album = self.cursor.fetchone() - if album[1] and album[1] not in artists.split(' / '): + if album[1] and album[1].split(' / ')[0] not in artists.split(' / '): + LOG.info("Album found, but artist doesn't match?") + LOG.info("Album [ %s/%s ] %s", name, album[1], artists) + raise TypeError - album_id = self.cursor.fetchone()[0] + album_id = (album or self.cursor.fetchone())[0] except TypeError: album_id = self.add_album(*(album_id, name, musicbrainz,) + args)