Skip to content

Commit

Permalink
Settings callback test and fix imports on activate, get style rules
Browse files Browse the repository at this point in the history
  • Loading branch information
gitmylo committed Jul 20, 2023
1 parent a6e6615 commit d3a98a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webui/extensionlib/extensionmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ def __init__(self, ext_name, load_states):

def activate(self):
if self.enabled and os.path.isfile(self.main_file):
__import__(self.main_file.replace(os.path.sep, '.'))
__import__(os.path.splitext(self.main_file)[0].replace(os.path.sep, '.'), fromlist=[''])

def get_style_rules(self):
if self.enabled and os.path.isfile(self.style_file):
__import__(self.style_file.replace(os.path.sep, '.'))
__import__(os.path.splitext(self.style_file)[0].replace(os.path.sep, '.'), fromlist=[''])

def get_requirements(self):
if self.enabled and os.path.isfile(self.req_file):
Expand Down Expand Up @@ -122,4 +122,4 @@ def get_requirements():
for req in [e.get_requirements() for e in states.values()]:
if req:
out += req
return out
return out
3 changes: 3 additions & 0 deletions webui/ui/tabs/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ def save_val(self):
'description': 'Pick a style to display the audio outputs as in a video.'
}
}
import webui.extensionlib.callbacks as cb
settings_add = cb.get_manager('webui.settings')()
print(settings_add)


config_path = os.path.join('data', 'config.json')
Expand Down

0 comments on commit d3a98a0

Please sign in to comment.