def run_me(url): global root_xml_url root_xml_url = url # koding.User_Info() if xbmcaddon.Addon().getSetting("first_run") == "true": first_run_wizard() foldername = xbmc.getInfoLabel("Container.FolderName") if foldername in ["", "plugin.program.super.favourites"]: __builtin__.JEN_WIDGET = True else: __builtin__.JEN_WIDGET = False xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_NONE) xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_LABEL) logging.warning('1') router.Run() logging.warning('1') xbmcplugin.endOfDirectory(int(sys.argv[1]), cacheToDisc=False) content_type = '' try: content_type = __builtin__.content_type except: pass logging.warning('3') if not xbmcaddon.Addon().getSetting("first_run") == "true": if content_type == "files": content_type = "other" resources.lib.util.views.set_list_view_mode(content_type) logging.warning('4')
def first_run_wizard(): result = run_hook("first_run_wizard") if result: return # koding.User_Info() if xbmcaddon.Addon().getSetting("first_run") == "true": first_run_wizard() foldername = xbmc.getInfoLabel("Container.FolderName") if foldername in ["", "plugin.program.super.favourites"]: __builtin__.JEN_WIDGET = True else: __builtin__.JEN_WIDGET = False xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_NONE) xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_LABEL) router.Run() xbmcplugin.endOfDirectory(int(sys.argv[1]), cacheToDisc=False) try: content_type = __builtin__.content_type except: pass if not xbmcaddon.Addon().getSetting("first_run") == "true": if content_type == "files": content_type = "other" resources.lib.util.views.set_list_view_mode(content_type)