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
				
			
		|  | @ -1,5 +1,5 @@ | ||||||
| <?xml version='1.0' encoding='utf-8'?> | <?xml version='1.0' encoding='utf-8'?> | ||||||
| <addon id="plugin.audio.librespot" version="0.0.3" name="Librespot" provider-name="Cere"> | <addon id="plugin.audio.librespot" version="0.1.0" name="Librespot" provider-name="Cere"> | ||||||
|     <requires> |     <requires> | ||||||
|         <import addon="xbmc.python" version="3.0.0" /> |         <import addon="xbmc.python" version="3.0.0" /> | ||||||
|         <import addon="xbmc.addon" version="18.9.701" /> |         <import addon="xbmc.addon" version="18.9.701" /> | ||||||
|  |  | ||||||
|  | @ -232,19 +232,33 @@ class PluginContent: | ||||||
| 
 | 
 | ||||||
|         li = xbmcgui.ListItem(label, offscreen=True) |         li = xbmcgui.ListItem(label, offscreen=True) | ||||||
|         li.setProperty("isPlayable", "true") |         li.setProperty("isPlayable", "true") | ||||||
|         li.setInfo( |         # Kodi 19 legacy code | ||||||
|             "music", |         # Unsure how to detect Kodi version so I'll leave this here for those stuck in the past | ||||||
|             { |         # li.setInfo( | ||||||
|                 "title": title, |         #     "music", | ||||||
|                 "genre": track["genre"], |         #     { | ||||||
|                 "year": track["year"], |         #         "title": title, | ||||||
|                 "tracknumber": track["track_number"], |         #         "genre": track["genre"], | ||||||
|                 "album": track["album"]["name"], |         #         "year": track["year"], | ||||||
|                 "artist": track["artist"], |         #         "tracknumber": track["track_number"], | ||||||
|                 "rating": track["rating"], |         #         "album": track["album"]["name"], | ||||||
|                 "duration": duration, |         #         "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.setArt({"thumb": track["thumb"]}) | ||||||
|         li.setProperty("spotifytrackid", track["id"]) |         li.setProperty("spotifytrackid", track["id"]) | ||||||
|         li.setContentLookup(False) |         li.setContentLookup(False) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue