From 3da0ab5b24856a8227fedfac9f177b4354dfba95 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sun, 9 Sep 2018 14:31:32 -0500 Subject: [PATCH] Fix empty albumid for songs --- resources/lib/objects/music.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/lib/objects/music.py b/resources/lib/objects/music.py index 1dacd0f5..041ffa0e 100644 --- a/resources/lib/objects/music.py +++ b/resources/lib/objects/music.py @@ -314,9 +314,12 @@ class Music(KodiDb): try: obj['AlbumId'] = self.emby_db.get_item_by_id(*values(obj, QUEM.get_item_song_obj))[0] except TypeError: - self.album(self.server['api'].get_item(obj['SongAlbumId'])) 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] except TypeError: self.single(obj)