def add_menu_item( self, query, infolabels, total_items=0, image="", fanart="", menu=None, replace_menu=None, visible=True ): if hasattr(visible, "__call__"): if visible() is False: return else: if visible is False: return if isinstance(infolabels["title"], (int, long)): infolabels["title"] = i18n(infolabels["title"]) if replace_menu is None: replace_menu = self.replace_context_menu_by_default if menu is None: menu = ContextMenu() for m in self.default_context_menu_items: menu.add(*m) if not fanart: fanart = ROOT_PATH + "/fanart.jpg" listitem = xbmcgui.ListItem(infolabels["title"], iconImage=image, thumbnailImage=image) listitem.setInfo("video", infolabels) listitem.setProperty("IsPlayable", "false") listitem.setProperty("fanart_image", fanart) if menu: listitem.addContextMenuItems(menu.get(), replaceItems=replace_menu) plugin_url = self.build_plugin_url(query) xbmcplugin.addDirectoryItem(HANDLE_ID, plugin_url, listitem, isFolder=True, totalItems=total_items)
def add(self, text, arguments={}, script=False, visible=True): if hasattr(visible, '__call__'): if visible() is False: return else: if visible is False: return if isinstance(text, (int, long)): text = i18n(text) cmd = self._build_url(arguments, script) self.commands.append((text, cmd, ''))
def add(self, text, arguments={}, script=False, visible=True, priority=50): if hasattr(visible, '__call__'): if visible() is False: return else: if visible is False: return if isinstance( text, ( int, long ) ): text = i18n(text) cmd = self._build_url(arguments, script) self.commands.append((text, cmd, '', priority))
def map(self, key): table = { 'tv_menu': 30000, 'movie_menu': 30001, 'settings_menu': 30002, 'show_about': 30003, 'authorize_trakt': 30004, 'calendar': 30005, 'genres': 30006, 'tv_watchlist': 30007, 'custom_lists': 30008, 'tv_trending': 30009, 'tv_popular': 30010, 'tv_recommended': 30011, 'search': 30012, 'movie_watchlist': 30013, 'movie_trending': 30014, 'movie_popular': 30015, 'movie_recommended': 30016, 'movie_discover': 30017, 'scraper_list': 30018, 'scraper_accounts': 30019, 'manage_transmogrifier':30020, 'enable_advanced_mode': 30021, 'enable_basic_mode': 30022, 'reset_trw': 30023, 'tv_anticipated': 30024, 'settings_transmogrifier': 30025, 'settings_urlresolver': 30026, 'settings_theroyalwe': 30027, 'calendar_browser': 30028, 'manage_hosts': 30029, 'my_collection': 30030, 'my_favorites': 30031, 'movie_tmdb': 30032, 'scraper_settings': 30033, 'manage_walter': 30034, 'ondeck': 30036, 'clear_cache': 30037, } if key in table.keys(): return i18n(table[key]) else: return False
def map(self, key): table = { 'tv_menu': 30000, 'movie_menu': 30001, 'settings_menu': 30002, 'show_about': 30003, 'authorize_trakt': 30004, 'calendar': 30005, 'genres': 30006, 'tv_watchlist': 30007, 'custom_lists': 30008, 'tv_trending': 30009, 'tv_popular': 30010, 'tv_recommended': 30011, 'search': 30012, 'movie_watchlist': 30013, 'movie_trending': 30014, 'movie_popular': 30015, 'movie_recommended': 30016, 'movie_discover': 30017, 'scraper_list': 30018, 'scraper_accounts': 30019, 'manage_transmogrifier': 30020, 'enable_advanced_mode': 30021, 'enable_basic_mode': 30022, 'reset_trw': 30023, 'tv_anticipated': 30024, 'settings_transmogrifier': 30025, 'settings_urlresolver': 30026, 'settings_theroyalwe': 30027, 'calendar_browser': 30028, 'manage_hosts': 30029, 'my_collection': 30030, 'my_favorites': 30031, 'movie_tmdb': 30032, 'scraper_settings': 30033, 'manage_walter': 30034, 'ondeck': 30036, 'clear_cache': 30037, } if key in table.keys(): return i18n(table[key]) else: return False
def map(self, key): table = { 'tv_menu': 30000, 'movie_menu': 30001, 'set_language': 30002, 'quick_search': 30003, 'settings_menu': 30004, 'transmogrified': 30005, 'update_now': 30006, 'show_help': 30007, 'tv_calendar': 30008, 'watchlist': 30009, 'custom_lists': 30010, 'genres': 30011, 'tv_recommended': 30012, 'tv_popular': 30013, 'tv_trending': 30014, 'search': 30015, 'movie_recommended': 30016, 'movie_popular': 30017, 'movie_trending': 30018, 'add_source_folders': 30019, 'manage_subscriptions': 30020, 'manage_hostlist': 30021, 'alluc_settings': 30022, 'transmogrifier_settings': 30023, 'urlresolver_settings': 30024, 'reset_alluc': 30025, 'tv_transmogrified': 30026, 'movie_transmogrified': 30027, 'transmogrifier_queue': 30028, 'authorize_trakt': 30029, 'enable_basic_mode': 30030, 'enable_advanced_mode': 30031, 'advanced_search': 30052, 'my_favorites': 30100 } if key in table.keys(): return i18n(table[key]) else: return False
def add_menu_item(self, query, infolabels, total_items=0, image='', fanart='', menu=None, replace_menu=None, visible=True): if hasattr(visible, '__call__'): if visible() is False: return else: if visible is False: return if isinstance(infolabels['title'], (int, long)): infolabels['title'] = i18n(infolabels['title']) if replace_menu is None: replace_menu = self.replace_context_menu_by_default if menu is None: menu = ContextMenu() for m in self.default_context_menu_items: menu.add(*m) if not fanart: fanart = ROOT_PATH + '/fanart.jpg' listitem = xbmcgui.ListItem(infolabels['title'], iconImage=image, thumbnailImage=image) listitem.setInfo('video', infolabels) listitem.setProperty('IsPlayable', 'false') listitem.setProperty('fanart_image', fanart) if menu: listitem.addContextMenuItems(menu.get(), replaceItems=replace_menu) plugin_url = self.build_plugin_url(query) xbmcplugin.addDirectoryItem(HANDLE_ID, plugin_url, listitem, isFolder=True, totalItems=total_items)