Example #1
0
def display_path(path):
    """
    Display path depending on its contents: video item, video list or categories.
    """
    __log__('display_path; path', path)
    if plugin.addon.getSetting('cache_pages') == 'true':
        page_type, contents = check_page(path)
    else:
        page_type, contents = exua_parser.check_page(path)
    view_mode = None
    if page_type == 'video_page':
        listing = views.list_video_details(plugin, contents)
        if plugin.addon.getSetting('use_skin_info') == 'true':
            # Switch view based on a current skin.
            current_skin = xbmc.getSkinDir()
            if current_skin in ('skin.confluence', 'skin.confluence-plood', 'skin.confluence-plood-gotham'):
                view_mode = 503
            elif current_skin in ('skin.aeon.nox', 'skin.aeon.nox.gotham', 'skin.aeon.shednox.helix'):
                view_mode = 52
            elif current_skin == 'skin.aeon.nox.5':
                view_mode = 55
    elif page_type == 'video_list':
        listing = views.list_videos(plugin, contents, path=path)
    elif page_type == 'categories':
        listing = views.list_categories(plugin, contents)
    else:
        listing = []
    __log__('display_path; listing', listing)
    return plugin.finish(listing, view_mode=view_mode)
Example #2
0
def check_page(url):
    return exua_parser.check_page(url)