Example #1
0
def add_item_list(item_list):
    for item in item_list:
        url = get_menu_link(action='PAGE', linkurl=item.link)
        add_dir(item.title, url, item.image_url, {
            'label': item.title,
            'plot': item.description
        })
Example #2
0
def add_item_list(item_list):
    for item in item_list:
        if item.isFolder:
            url = get_menu_link(action='PAGE', linkurl=item.link)
            add_dir(item.title, url)
        else:
            add_dir(item.title, item.link, item.image_url, video_item=True)
Example #3
0
def add_dir(name,
            params,
            logo=None,
            infoLabels={},
            menuItems={},
            addonDataItem=None):
    name = decode_html(name)
    for key in params.keys():
        value = decode_html(params[key])
        value = value.encode('utf-8')
        params[key] = value
    if not 'title' in infoLabels:
        infoLabels['title'] = name
    #client.add_dir(name, params, image=logo, infoLabels=infoLabels, menuItems=menuItems)
    try:
        client.add_dir(name,
                       params,
                       logo,
                       infoLabels=infoLabels,
                       menuItems=menuItems,
                       dataItem=addonDataItem)
    except Exception:
        # back compatibility
        try:
            client.add_dir(name,
                           params,
                           logo,
                           infoLabels=infoLabels,
                           menuItems=menuItems)
        except:
            add_dir(name,
                    params,
                    logo=logo,
                    infoLabels=infoLabels,
                    menuItems=menuItems)
Example #4
0
def add_video(name,
              params={},
              logo=None,
              infoLabels={},
              menuItems={},
              addonDataItem=None):
    name = decode_html(name)
    for key in params.keys():
        value = decode_html(params[key])
        value = value.encode('utf-8')
        params[key] = value
    try:
        client.add_dir(name,
                       params,
                       logo,
                       infoLabels=infoLabels,
                       menuItems=menuItems,
                       video_item=True,
                       dataItem=addonDataItem)
    except Exception:
        # back compatibility
        try:
            client.add_dir(name,
                           params,
                           logo,
                           infoLabels=infoLabels,
                           menuItems=menuItems,
                           video_item=True)
        except:
            add_dir(name,
                    params,
                    logo=logo,
                    infoLabels=infoLabels,
                    menuItems=menuItems)
Example #5
0
def add_dir(name, params, logo=None, infoLabels={}, menuItems={}):
    name = decode_html(name)
    for key in params.keys():
        value = decode_html(params[key])
        value = value.encode('utf-8')
        params[key] = value
    if not 'title' in infoLabels:
        infoLabels['title'] = name
    client.add_dir(name, params, image=logo, infoLabels=infoLabels, menuItems=menuItems)
Example #6
0
def add_filters(page, pageurl):
    if page.current_filters:
        title = u'[B]Odstranit nastavené filtry: [/B]' + ", ".join(map(lambda x: x.title, page.current_filters.item_list))
        url = get_menu_link( action = 'FILTER-REMOVE', linkurl = page.current_filters.link )
        add_dir(title, url)
    for filterid, filter_list in enumerate(page.filter_lists):
        title = u'[B]Nastav filtr: [/B]' + filter_list.title
        url = get_menu_link( action = 'FILTER-MANAGE', linkurl = pageurl, filterid = filterid )
        add_dir(title, url)
def add_dir(name, params, logo=None, infoLabels={}, menuItems={}):
    name = decode_html(name)
    for key in params.keys():
		value = decode_html(params[key])
		value = value.encode('utf-8')
		params[key] = value
    if not 'title' in infoLabels:
        infoLabels['title'] = name
    client.add_dir(name, params, image=logo, infoLabels=infoLabels, menuItems=menuItems)
Example #8
0
def add_video(name, params={}, logo=None, infoLabels={}, menuItems={}):
    name = decode_html(name)
    for key in params.keys():
        value = decode_html(params[key])
        value = value.encode('utf-8')
        params[key] = value
    try:
        client.add_dir(name, params, logo, infoLabels=infoLabels, menuItems=menuItems, video_item=True)
    except Exception:
        add_dir(name, params, logo=logo, infoLabels=infoLabels, menuItems=menuItems)
def add_video(name, params={}, logo=None, infoLabels={}, menuItems={}):
	name = decode_html(name)
	for key in params.keys():
		value = decode_html(params[key])
		value = value.encode('utf-8')
		params[key] = value
	try:
		client.add_dir(name, params, logo, infoLabels=infoLabels, menuItems=menuItems, video_item=True)
	except Exception:
		add_dir(name, params, logo=logo, infoLabels=infoLabels, menuItems=menuItems)
Example #10
0
def add_video(name, params={}, logo=None, infoLabels={}, menuItems={}, addonDataItem=None):
    name = decode_html(name)
    for key in params.keys():
        value = decode_html(params[key])
        value = value.encode('utf-8')
        params[key] = value
    try:
        client.add_dir(name, params, logo, infoLabels=infoLabels, menuItems=menuItems, video_item=True, dataItem=addonDataItem)
    except Exception:
        # back compatibility
        try:
            client.add_dir(name, params, logo, infoLabels=infoLabels, menuItems=menuItems, video_item=True)
        except:
            add_dir(name, params, logo=logo, infoLabels=infoLabels, menuItems=menuItems)
Example #11
0
def addDir(name,
           url,
           mode,
           image,
           page=None,
           kanal=None,
           infoLabels={},
           menuItems={}):
    params = {
        'name': name,
        'url': url,
        'mode': mode,
        'page': page,
        'kanal': kanal
    }
    add_dir(name, params, image, infoLabels=infoLabels, menuItems=menuItems)
Example #12
0
def add_dir(name, params, logo=None, infoLabels={}, menuItems={}, addonDataItem=None):
    name = decode_html(name)
    for key in params.keys():
        value = decode_html(params[key])
        value = value.encode('utf-8')
        params[key] = value
    if not 'title' in infoLabels:
        infoLabels['title'] = name
    #client.add_dir(name, params, image=logo, infoLabels=infoLabels, menuItems=menuItems)
    try:
        client.add_dir(name, params, logo, infoLabels=infoLabels, menuItems=menuItems, dataItem=addonDataItem)
    except Exception:
        # back compatibility
        try:
            client.add_dir(name, params, logo, infoLabels=infoLabels, menuItems=menuItems)
        except:
            add_dir(name, params, logo=logo, infoLabels=infoLabels, menuItems=menuItems)
Example #13
0
def shows_menu(pageurl, list_only=False):
    add_dir("ŽIVĚ - Prima", {'action': 'PLAY', 'linkurl': 'https://prima.iprima.cz'}, None, video_item=True)
    add_dir("ŽIVĚ - Prima COOL", {'action': 'PLAY', 'linkurl': 'https://cool.iprima.cz'}, None, video_item=True)
    add_dir("ŽIVĚ - Prima MAX", {'action': 'PLAY', 'linkurl': 'https://max.iprima.cz'}, None, video_item=True)
    add_dir("ŽIVĚ - Prima KRIMI", {'action': 'PLAY', 'linkurl': 'https://krimi.iprima.cz'}, None, video_item=True)
    add_dir("ŽIVĚ - Prima LOVE", {'action': 'PLAY', 'linkurl': 'https://love.iprima.cz'}, None, video_item=True)
    add_dir("ŽIVĚ - Prima ZOOM", {'action': 'PLAY', 'linkurl': 'https://zoom.iprima.cz'}, None, video_item=True)
    add_dir("Velké zprávy", {'action': 'PAGE', 'linkurl': 'https://prima.iprima.cz/porady/velke-zpravy/epizody'}, None)
    add_dir("Prima ZOOM Svět", {'action': 'PAGE', 'linkurl': 'https://prima.iprima.cz/porady/prima-zoom-svet/epizody'}, None)
    add_dir("Show Jana Krause", {'action': 'PAGE', 'linkurl': 'https://prima.iprima.cz/porady/show-jana-krause/epizody'}, None)
    add_dir("Autosalon", {'action': 'PAGE', 'linkurl': 'https://cool.iprima.cz/porady/autosalon/epizody'}, None)
    add_dir("Receptář Prima nápadů", {'action': 'PAGE', 'linkurl': 'https://prima.iprima.cz/receptar-prima-napadu/epizody'}, None)
    add_dir("VŠECHNY POŘADY", {'action': 'CATEGORIES', 'linkurl': pageurl}, None)
Example #14
0
def add_player(player):
    url = get_menu_link( action = 'RESOLVE', linkurl = player.video_link )
    add_dir(u"[B]Přehraj:[/B] " + player.title, url, player.image_url, video_item=True)
Example #15
0
def add_next_link(next_link):
    title = u'Další stránka'
    url = get_menu_link( action = 'PAGE-NEXT', linkurl = next_link )
    add_dir(title, url)
Example #16
0
def add_title(video_list):
    title = '[B]'+video_list.title+'[/B]'
    url = None
    if video_list.link:
        url = get_menu_link( action = 'PAGE', linkurl = video_list.link )
    add_dir(title, url)
Example #17
0
def add_account_menu():
    if _play_account is None: return
    title = u'[B]Můj PLAY[/B]'
    url = get_menu_link( action = 'ACCOUNT' )
    add_dir(title, url)
Example #18
0
def add_search_menu():
    title = u'[B]Hledej[/B]'
    url = get_menu_link( action = 'SEARCH' )
    add_dir(title, url)
Example #19
0
def addDir(name, url, mode, image, page=None, kanal=None, infoLabels={}, menuItems={}):
    params = {'name':name, 'url':url, 'mode':mode, 'page':page, 'kanal':kanal}
    add_dir(name, params, image, infoLabels=infoLabels, menuItems=menuItems)
Example #20
0
def add_show(video_list):
    title = video_list.title
    url = None
    if video_list.link:
        url = get_menu_link(action='SHOW-NAV', linkurl=video_list.link)
    add_dir(title, url, video_list.thumbnail)