Exemple #1
0
    Addon.log(mode)

    username = Addon.get_setting('username')

    if username:
        Addon.add_directory({
            'mode': 'list_playlists',
            'ob': username
        }, username)

    country = Addon.get_setting('country')
    playlists = muzu.list_toplevel_playlists(country)
    total_items = len(playlists)

    for p in playlists:
        label = Addon.unescape(p['name'])
        thumb = p['thumb']
        Addon.add_directory(
            {
                'play': p['playlist_id'],
                'network': p['network'],
                'mode': 'playlist'
            },
            label,
            thumb,
            total_items=total_items)

elif mode == 'channels':
    Addon.log(mode)

    network_id = Addon.plugin_queries.get('network_id', False)
Exemple #2
0
        mode = 'toplevel_playlist'

if mode == 'toplevel_playlist':
    Addon.log(mode)

    username = Addon.get_setting('username')

    if username:
        Addon.add_directory({'mode': 'list_playlists', 'ob': username}, username)

    country     = Addon.get_setting('country')
    playlists   = muzu.list_toplevel_playlists(country)
    total_items = len(playlists)
   
    for p in playlists:
        label = Addon.unescape(p['name'])
        thumb = p['thumb']
        Addon.add_directory({'play': p['playlist_id'],
                                 'network': p['network'], 
                                 'mode': 'playlist'}, 
                                 label, thumb, total_items=total_items)

elif mode == 'channels':
    Addon.log(mode)

    network_id  = Addon.plugin_queries.get('network_id', False)    
    page        = int(Addon.plugin_queries.get('page', 0))
    sort        = Addon.plugin_queries.get('sort', False)

    if network_id:
        playlists = muzu.list_playlists_by_network(network_id, page)