def switch_user(self):
'''called whenever we switch to a different user/credentials'''
log_msg("login credentials changed")
if self.renew_token():
xbmc.executebuiltin("Container.Refresh")
me = self.sp.me()
log_msg("Logged in to Spotify - Username: %s" % me["id"], xbmc.LOGNOTICE)
# restart daemon
if self.connect_player.daemon_active:
self.connect_player.stop_thread()
audio_device = self.addon.getSetting("audio_device") == "true"
self.connect_player = ConnectPlayer(sp=self.sp, audio_device=audio_device, spotty=self.spotty)
self.connect_player.start()
评论列表
文章目录