Ejemplo n.º 1
0
 def playlist(self, name):
     for item in self.mpd.listplaylistinfo(name):
         print item
         info = util.get_info_labels_from_queued_item(item)
         title = util.format_song(info)
         menu = {
             __str__(30030): {
                 self.key: 'queue_add',
                 'file': item['file']
             },
             __str__(30031): {
                 self.key: 'queue_repl',
                 'file': item['file']
             }
         }
         util.add_song(title, {
             self.key: 'play',
             'id': 'id'
         },
                       infoLabels=info,
                       menuItems=menu,
                       replace=True)
     xbmcplugin.addSortMethod(handle=int(sys.argv[1]),
                              sortMethod=xbmcplugin.SORT_METHOD_LABEL,
                              label2Mask="%X")
Ejemplo n.º 2
0
 def playlist(self, name):
     for item in self.mpd.listplaylistinfo(name):
         info = util.get_info_labels_from_queued_item(item)
         title = util.format_song(info)
         yield self.item_audio(title=title,
                               params={'path': item['file']},
                               menu=self.menu_items_file(item['file']))
Ejemplo n.º 3
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={})
Ejemplo n.º 4
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())
Ejemplo n.º 5
0
 def playlist(self,name):
     for item in self.mpd.listplaylistinfo(name):
         print item
         info = util.get_info_labels_from_queued_item(item)
         title = util.format_song(info)
         menu={
                 __str__(30030):{self.key:'queue_add','file':item['file']},
                 __str__(30031):{self.key:'queue_repl','file':item['file']}
         }
         util.add_song(title,{self.key:'play','id':'id'},infoLabels=info,menuItems=menu,replace=True)
     xbmcplugin.addSortMethod( handle=int(sys.argv[1]), sortMethod=xbmcplugin.SORT_METHOD_LABEL, label2Mask="%X")
Ejemplo n.º 6
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())
Ejemplo n.º 7
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={})
Ejemplo n.º 8
0
 def playlist(self,name):
     for item in self.mpd.listplaylistinfo(name):
         info = util.get_info_labels_from_queued_item(item)
         title = util.format_song(info)
         yield self.item_audio(title=title,params={'path':item['file']},menu=self.menu_items_file(item['file']))