Browse Source

Добавлена загрузка DRP из настроек

master
cofob 10 months ago
parent
commit
47bd258a51
No known key found for this signature in database GPG Key ID: BA5F250F390317D6
  1. 10
      main.py

10
main.py

@ -16,10 +16,6 @@ logging.basicConfig(format='%(levelname)s:%(name)s -> %(message)s [%(asctime)s]'
log = logging.getLogger("main")
# SETUP
# DRP INIT
DRP_THREAD = threading.Thread(target=drp_thread, args=(drp.DRP(DRP_DEFAULT_APP_ID), ))
DRP_THREAD.start()
# create dirs and files
mkdir(BASE_FOLDER, ADDONS_FOLDER)
if not os.path.isfile(get_path([BASE_FOLDER, 'config'])):
@ -41,6 +37,12 @@ else:
mkdir(BASE_FOLDER, ADDONS_FOLDER, DRP_FOLDER)
mkdir(BASE_FOLDER, ADDONS_FOLDER, STATUS_FOLDER)
# DRP INIT
CURRENT_DRP_APP_ID = CONFIG.get('app_id', DRP_DEFAULT_APP_ID)
log.info('current DRP app id -> '+str(CURRENT_DRP_APP_ID))
DRP_THREAD = threading.Thread(target=drp_thread, args=(drp.DRP(CURRENT_DRP_APP_ID), ))
DRP_THREAD.start()
# drp addons import
drp_addon_modules = []
for name in os.listdir(os.path.join(ADDONS_FOLDER, DRP_FOLDER)):