mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 12:16:12 +00:00
Small music fix
This commit is contained in:
parent
4fdadb8b27
commit
a988d418ef
1 changed files with 6 additions and 2 deletions
|
@ -126,14 +126,18 @@ class Music(Kodi):
|
||||||
try:
|
try:
|
||||||
if musicbrainz is not None:
|
if musicbrainz is not None:
|
||||||
self.cursor.execute(QU.get_album, (musicbrainz,))
|
self.cursor.execute(QU.get_album, (musicbrainz,))
|
||||||
|
album = None
|
||||||
else:
|
else:
|
||||||
self.cursor.execute(QU.get_album_by_name, (name,))
|
self.cursor.execute(QU.get_album_by_name, (name,))
|
||||||
album = self.cursor.fetchone()
|
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
|
raise TypeError
|
||||||
|
|
||||||
album_id = self.cursor.fetchone()[0]
|
album_id = (album or self.cursor.fetchone())[0]
|
||||||
except TypeError:
|
except TypeError:
|
||||||
album_id = self.add_album(*(album_id, name, musicbrainz,) + args)
|
album_id = self.add_album(*(album_id, name, musicbrainz,) + args)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue