mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-24 09:46:11 +00:00
First try at fixing singles issue for music
This commit is contained in:
parent
1893e79014
commit
bcee7dde76
2 changed files with 5 additions and 4 deletions
|
@ -176,13 +176,14 @@ class ReadEmbyDB():
|
|||
url = "{server}/mediabrowser/Users/{UserId}/Items?StartIndex=%s&Limit=%s&Fields=Etag,Path,Genres,SortName,Studios,Writer,ProductionYear,Taglines,CommunityRating,OfficialRating,CumulativeRunTimeTicks,Metascore,AirTime,DateCreated,MediaStreams,People,Overview&SortBy=DateCreated&Recursive=true&IncludeItemTypes=MusicAlbum&format=json" % (index, jump)
|
||||
jsondata = self.doUtils.downloadUrl(url)
|
||||
|
||||
tempresult = []
|
||||
#tempresult = []
|
||||
# Only return valid albums - which have artists
|
||||
for item in jsondata['Items']:
|
||||
'''for item in jsondata['Items']:
|
||||
if item['AlbumArtists']:
|
||||
tempresult.append(item)
|
||||
|
||||
result.extend(tempresult)
|
||||
result.extend(tempresult)'''
|
||||
result.extend(jsondata['Items'])
|
||||
index += jump
|
||||
|
||||
return result
|
||||
|
|
|
@ -331,7 +331,7 @@ class WriteKodiMusicDB():
|
|||
# Kodi Gotham and Helix
|
||||
query = "INSERT INTO album(idAlbum, strArtists, strGenres, iYear, dateAdded) values(?, ?, ?, ?, ?)"
|
||||
cursor.execute(query, (albumid, artists, genre, year, dateadded))
|
||||
|
||||
finally:
|
||||
# Link album to artists
|
||||
for artist in MBitem['ArtistItems']:
|
||||
cursor.execute("SELECT kodi_id FROM emby WHERE emby_id = ?", (artist['Id'],))
|
||||
|
|
Loading…
Reference in a new issue