Fix empty albumid for songs

This commit is contained in:
angelblue05 2018-09-09 14:31:32 -05:00
parent ebb4139d48
commit 3da0ab5b24

View file

@ -314,9 +314,12 @@ class Music(KodiDb):
try: try:
obj['AlbumId'] = self.emby_db.get_item_by_id(*values(obj, QUEM.get_item_song_obj))[0] obj['AlbumId'] = self.emby_db.get_item_by_id(*values(obj, QUEM.get_item_song_obj))[0]
except TypeError: except TypeError:
self.album(self.server['api'].get_item(obj['SongAlbumId']))
try: try:
if obj['SongAlbumId'] is None:
raise TypeError("No album id found associated?")
self.album(self.server['api'].get_item(obj['SongAlbumId']))
obj['AlbumId'] = self.emby_db.get_item_by_id(*values(obj, QUEM.get_item_song_obj))[0] obj['AlbumId'] = self.emby_db.get_item_by_id(*values(obj, QUEM.get_item_song_obj))[0]
except TypeError: except TypeError:
self.single(obj) self.single(obj)