def display_path(params): """ Display a ex.ua page depending on its type params: path """ if plugin.cache_pages: result = _detect_page_type(params['path']) else: result = exua.detect_page_type(params['path']) plugin.log_debug('Page type detection result: {0}'.format(result)) content = None if result.type == 'media_page': listing = _media_info(result.content) content = 'movies' # The best tried and tested variant elif result.type == 'media_list': listing = _media_list(params['path'], result.content) elif result.type == 'media_categories': listing = _media_categories(result.content, 'video') else: listing = [] return plugin.create_listing(listing, content=content)
def _detect_page_type(path): return exua.detect_page_type(path)