def list(self): playlist = self.mpd.playlistinfo() print playlist current = util.fix_keys(self.mpd.currentsong(),['id']) for item in playlist: info = util.get_info_labels_from_queued_item(item) title = util.format_song(info) if current['id'] == item['id']: title = '* %s' % title util.add_song(title,{self.key:'play','id':item['id']},infoLabels=info,menuItems={})
def list(self): playlist = self.mpd.playlistinfo() current = util.fix_keys(self.mpd.currentsong(),['id']) yield self.item_dummy() for item in playlist: info = util.get_info_labels_from_queued_item(item) title = util.format_song(info) if current['id'] == item['id']: title = '[B]* %s *[/B]' % title yield self.item_audio(title=title,params={'play':item['id']},info=info,menu=self.menu_items())
def list(self): playlist = self.mpd.playlistinfo() current = util.fix_keys(self.mpd.currentsong(), ['id']) yield self.item_dummy() for item in playlist: info = util.get_info_labels_from_queued_item(item) title = util.format_song(info) if current['id'] == item['id']: title = '[B]* %s *[/B]' % title yield self.item_audio(title=title, params={'play': item['id']}, info=info, menu=self.menu_items())
def list(self): playlist = self.mpd.playlistinfo() print playlist current = util.fix_keys(self.mpd.currentsong(), ['id']) for item in playlist: info = util.get_info_labels_from_queued_item(item) title = util.format_song(info) if current['id'] == item['id']: title = '* %s' % title util.add_song(title, { self.key: 'play', 'id': item['id'] }, infoLabels=info, menuItems={})