Update xtendr/xtendrsystem.py
This commit is contained in:
@@ -2,6 +2,7 @@ import importlib
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
import threading
|
||||||
from xtendr.xtendrbase import XtendRBase
|
from xtendr.xtendrbase import XtendRBase
|
||||||
|
|
||||||
__version__ = "0.1.3"
|
__version__ = "0.1.3"
|
||||||
@@ -74,7 +75,7 @@ class XtendRSystem:
|
|||||||
"""Pre-load data if needed"""
|
"""Pre-load data if needed"""
|
||||||
if name in plugins:
|
if name in plugins:
|
||||||
if self.plugins[name].use_pre_load: # Is pre-loading neccessary?
|
if self.plugins[name].use_pre_load: # Is pre-loading neccessary?
|
||||||
self.plugins[name].pre_load()
|
threading.Thread(target=self.plugins[name].pre_load()).start()
|
||||||
|
|
||||||
def run(self, name: str, *args, **kwargs):
|
def run(self, name: str, *args, **kwargs):
|
||||||
"""Run the plugin's 'run' method if available."""
|
"""Run the plugin's 'run' method if available."""
|
||||||
|
|||||||
Reference in New Issue
Block a user