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")
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']))
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 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")
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={})
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']))