mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 18:26:15 +00:00
final attempt to get the unlinked artist correctly shown up
This commit is contained in:
parent
7fde54514e
commit
27b13d6509
1 changed files with 8 additions and 1 deletions
|
@ -304,7 +304,14 @@ class WriteKodiMusicDB():
|
|||
albumid = albumid + 1
|
||||
pathsql="insert into album(idAlbum, strArtists, strGenres, iYear, dateAdded) values(?, ?, ?, ?, ?)"
|
||||
cursor.execute(pathsql, (albumid, artists, genres, year, dateadded))
|
||||
|
||||
#some stuff here to get the album linked to artists
|
||||
for artist in MBitem.get("ArtistItems"):
|
||||
cursor.execute("SELECT kodi_id FROM emby WHERE emby_id = ?",(artist["Id"],))
|
||||
result = cursor.fetchone()
|
||||
if result:
|
||||
artistid = result[0]
|
||||
sql="INSERT OR REPLACE into album_artist(idArtist, idAlbum, strArtist) values(?, ?, ?)"
|
||||
cursor.execute(sql, (artistid, albumid, artist["Name"]))
|
||||
|
||||
playurl = PlayUtils().getPlayUrl(server, MBitem["Id"], MBitem)
|
||||
#for transcoding we need to create a fake strm file because I couldn't figure out how to set a http or plugin path in the music DB
|
||||
|
|
Loading…
Reference in a new issue