def play_genres(self, genre_list, player_id=None):
"""Adds then plays a random mix of albums of specified genres"""
gs = genre_list or []
commands = (["playlist clear", "playlist shuffle 1"] +
["playlist addalbum %s * *" % urllib.quote(genre)
for genre in gs if genre] +
["play 2"])
pid = player_id or self.cur_player_id
return self._request(["%s %s" % (pid, com) for com in commands])
评论列表
文章目录