Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)

        def add_music_item(url, infolabels, img='', fanart='', total_items=0, 
                   playlist=False, playlist_pos=None):
    infolabels = decode_dict(infolabels)
    if url.find('://') == -1:
        url = build_plugin_url({'play': url})
    listitem = xbmcgui.ListItem(infolabels['title'], iconImage=img, 
                                thumbnailImage=img)
    listitem.setInfo('music', infolabels)
    listitem.setProperty('IsPlayable', 'true')
    listitem.setProperty('fanart_image',fanart)
    if playlist is not False:
        log('adding item: %s - %s to playlist' % (infolabels['title'], url))
        if not playlist_pos:
            playlist_pos = len(playlist)
        if playlist_pos < 0:
            playlist_pos += len(playlist)
        playlist.add(url, listitem, playlist_pos)
    else:
        log('adding item: %s - %s' % (infolabels['title'], url))
        xbmcplugin.addDirectoryItem(plugin_handle, url, listitem, 
                                    isFolder=False, totalItems=total_items)
        


src/t/0/t0mm0-xbmc-plugins-HEAD/plugin.audio.8tracks/resources/lib/eighttracks.py   t0mm0-xbmc-plugins(Download)
        t = result['set']['track']
        comment = 'mix: %s by %s' % (self.mix_name, self.user)
        Addon.add_music_item(t['url'], {'title': t['name'], 
                                        'artist': t['performer'], 
                                        'comment': comment,