version bump, update deprecated functions that spam my log (lol)
This commit is contained in:
		
							parent
							
								
									c172a6d976
								
							
						
					
					
						commit
						d51ec760e3
					
				
					 2 changed files with 28 additions and 14 deletions
				
			
		|  | @ -232,19 +232,33 @@ class PluginContent: | |||
| 
 | ||||
|         li = xbmcgui.ListItem(label, offscreen=True) | ||||
|         li.setProperty("isPlayable", "true") | ||||
|         li.setInfo( | ||||
|             "music", | ||||
|             { | ||||
|                 "title": title, | ||||
|                 "genre": track["genre"], | ||||
|                 "year": track["year"], | ||||
|                 "tracknumber": track["track_number"], | ||||
|                 "album": track["album"]["name"], | ||||
|                 "artist": track["artist"], | ||||
|                 "rating": track["rating"], | ||||
|                 "duration": duration, | ||||
|             }, | ||||
|         ) | ||||
|         # Kodi 19 legacy code | ||||
|         # Unsure how to detect Kodi version so I'll leave this here for those stuck in the past | ||||
|         # li.setInfo( | ||||
|         #     "music", | ||||
|         #     { | ||||
|         #         "title": title, | ||||
|         #         "genre": track["genre"], | ||||
|         #         "year": track["year"], | ||||
|         #         "tracknumber": track["track_number"], | ||||
|         #         "album": track["album"]["name"], | ||||
|         #         "artist": track["artist"], | ||||
|         #         "rating": track["rating"], | ||||
|         #         "duration": duration, | ||||
|         #     }, | ||||
|         # ) | ||||
| 
 | ||||
|         # Kodi 20+ Equivalent | ||||
|         limus: xbmc.InfoTagMusic = li.getMusicInfoTag() | ||||
|         limus.setTitle(title) | ||||
|         limus.setAlbum(track["album"]["name"]) | ||||
|         limus.setGenres([track["genre"]]) | ||||
|         limus.setYear(track["year"]) | ||||
|         limus.setTrack(track["track_number"]) | ||||
|         limus.setArtist(track["artist"]) | ||||
|         limus.setRating(track["rating"]) | ||||
|         limus.setDuration(duration) | ||||
| 
 | ||||
|         li.setArt({"thumb": track["thumb"]}) | ||||
|         li.setProperty("spotifytrackid", track["id"]) | ||||
|         li.setContentLookup(False) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue