def __init__(self): #BASE_RESOURCE_PATH = os.path.join( os.getcwd(), "resources" ) BASE_RESOURCE_PATH = os.path.join( ptv.getAddonInfo('path'), "resources" ) BASE_RESOURCE_PATH = os.path.join( ptv2.getAddonInfo('path'), "resources" ) sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib" ) ) sys.path.append( os.path.join( BASE_RESOURCE_PATH, "resources" ) ) sys.path.append( os.path.join( ptv.getAddonInfo('path'), "host" ) ) import mrknow_pLog, settings, Parser, mrknow_pCommon self.cm = mrknow_pCommon.common() self.log = mrknow_pLog.pLog() self.settings = settings.TVSettings() self.parser = Parser.Parser() #self.log.info("DIR " + common.Paths.modulesDir + 'mainMenu.cfg') #self.MAIN_MENU_FILE = os.path.join( common.Paths.modulesDir, 'mainMenu.cfg' ) self.MAIN_MENU_FILE = 'mainMenu.cfg' if not os.path.exists(common.Paths.pluginDataDir): os.makedirs(common.Paths.pluginDataDir, 0777) self.favouritesManager = FavouritesManager(common.Paths.favouritesFolder) self.customModulesManager = CustomModulesManager(common.Paths.customModulesDir, common.Paths.customModulesRepo) if not os.path.exists(common.Paths.customModulesDir): os.makedirs(common.Paths.customModulesDir, 0777) self.parser2 = Parser2() self.currentlist = None self.addon = None self.log.info('Filmy online www.mrknow.pl') common.clearCache()
def __init__(self): #BASE_RESOURCE_PATH = os.path.join( os.getcwd(), "resources" ) BASE_RESOURCE_PATH = os.path.join(ptv.getAddonInfo('path'), "resources") BASE_RESOURCE_PATH = os.path.join(ptv2.getAddonInfo('path'), "resources") sys.path.append(os.path.join(BASE_RESOURCE_PATH, "lib")) sys.path.append(os.path.join(BASE_RESOURCE_PATH, "resources")) sys.path.append(os.path.join(ptv.getAddonInfo('path'), "host")) import mrknow_pLog, settings, mrknow_Parser, mrknow_pCommon self.cm = mrknow_pCommon.common() self.log = mrknow_pLog.pLog() self.settings = settings.TVSettings() self.parser = mrknow_Parser.mrknow_Parser() #self.log.info("DIR " + common.Paths.modulesDir + 'mainMenu.cfg') if ptv.getSetting('adults') == 'false': self.MAIN_MENU_FILE = 'mainMenu.cfg' else: self.MAIN_MENU_FILE = 'mainMenuAdult.cfg' self.SPORT_MENU_FILE = 'sportMenu.cfg' if not os.path.exists(common.Paths.pluginDataDir): os.makedirs(common.Paths.pluginDataDir, 0777) self.favouritesManager = FavouritesManager( common.Paths.favouritesFolder) self.customModulesManager = CustomModulesManager( common.Paths.customModulesDir, common.Paths.customModulesRepo) if not os.path.exists(common.Paths.customModulesDir): os.makedirs(common.Paths.customModulesDir, 0777) self.parser2 = Parser2() self.currentlist = None self.addon = None self.log.info('Filmy online www.mrknow.pl') common.clearCache()