Esempio n. 1
0
 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={})
Esempio n. 2
0
 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())
Esempio n. 3
0
 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())
Esempio n. 4
0
 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={})