def playList(fmid, t): playlist = xbmc.PlayList(0) playlist.clear() for song in kugou.getSongs(fmid,t): listitem=xbmcgui.ListItem(song['name']) listitem.setInfo(type="Music",infoLabels={ "Title": song['name']}) playlist.add(kugou.getSongInfo(song['hash']), listitem) xbmc.Player().play(playlist)
def playList(fmid, t): playlist = xbmc.PlayList(0) playlist.clear() for song in kugou.getSongs(fmid, t): listitem = xbmcgui.ListItem(song['name']) listitem.setInfo(type="Music", infoLabels={"Title": song['name']}) playlist.add(kugou.getSongInfo(song['hash']), listitem) xbmc.Player().play(playlist)
def play(hashId, title): playlist = xbmc.PlayList(0) playlist.clear() #中止播放列表 xbmc.Player().stop() mp3path = kugou.getSongInfo(hashId) icon = kugou.getSingerPic(title, 100) thumbnail = kugou.getSingerPic(title, 200) listitem=xbmcgui.ListItem(title, iconImage = icon, thumbnailImage = thumbnail) listitem.setInfo(type="Music",infoLabels={ "Title": title}) xbmc.Player().play(mp3path,listitem)
def play(hashId, title): playlist = xbmc.PlayList(0) playlist.clear() #中止播放列表 xbmc.Player().stop() mp3path = kugou.getSongInfo(hashId) icon = kugou.getSingerPic(title, 100) thumbnail = kugou.getSingerPic(title, 200) listitem = xbmcgui.ListItem(title, iconImage=icon, thumbnailImage=thumbnail) listitem.setInfo(type="Music", infoLabels={"Title": title}) xbmc.Player().play(mp3path, listitem)