mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Fix music album + logging
This commit is contained in:
parent
2928fd175e
commit
0cc6d36caa
1 changed files with 4 additions and 0 deletions
|
@ -2042,13 +2042,17 @@ class Music(Items):
|
||||||
return
|
return
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# No album found. Let's create it
|
# No album found. Let's create it
|
||||||
|
self.logMsg("Album database entry missing.", 1)
|
||||||
emby_albumId = item['AlbumId']
|
emby_albumId = item['AlbumId']
|
||||||
album = self.emby.getItem(emby_albumId)
|
album = self.emby.getItem(emby_albumId)
|
||||||
|
self.add_updateAlbum(album)
|
||||||
emby_dbalbum = emby_db.getItem_byId(emby_albumId)
|
emby_dbalbum = emby_db.getItem_byId(emby_albumId)
|
||||||
try:
|
try:
|
||||||
albumid = emby_dbalbum[0]
|
albumid = emby_dbalbum[0]
|
||||||
|
self.logMsg("Found albumid: %s" % albumid, 1)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# No album found, create a single's album
|
# No album found, create a single's album
|
||||||
|
self.logMsg("Failed to add album. Creating singles.", 1)
|
||||||
kodicursor.execute("select coalesce(max(idAlbum),0) from album")
|
kodicursor.execute("select coalesce(max(idAlbum),0) from album")
|
||||||
albumid = kodicursor.fetchone()[0] + 1
|
albumid = kodicursor.fetchone()[0] + 1
|
||||||
if kodiversion == 16:
|
if kodiversion == 16:
|
||||||
|
|
Loading…
Reference in a new issue