def play_artists(artists=False): if not artists: artists = common.get_local_artists() kill_old_process() if artists: from resources.lib.artist_player import mvmixArtistPlayer player = mvmixArtistPlayer() player.playArtists(artists) while player.is_active and not xbmc.abortRequested: player.sleep(200)
def list_local_artists(): artists = common.get_local_artists() for a in artists: artist = a['artist'] try: artist = artist.encode('utf-8') except: pass image = a['thumbnail'] try: image = image.encode('utf-8') except: pass addDir(artist,'play',image,'',add=False) xbmcplugin.addSortMethod(pluginhandle, 1) xbmcplugin.endOfDirectory(pluginhandle)