Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2024-11-14 11:22:20 -05:00
parent 4f1c9cf5c7
commit f36c4d8a2b
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
const fs = require('fs'); // eslint-disable-line no-undef
const process = require('process'); // eslint-disable-line no-undef
const sd_url = process.env.SDAPI_URL || 'http://127.0.0.1:32769';
const sd_url = process.env.SDAPI_URL || 'http://127.0.0.1:7860';
const sd_username = process.env.SDAPI_USR;
const sd_password = process.env.SDAPI_PWD;
const sd_options = {
+3 -3
View File
@@ -7,7 +7,7 @@ from modules.errors import log
def script_name_to_index(name, scripts_list):
if name is None or len(name) == 0:
if name is None or len(name) == 0 or name == 'none':
return None
try:
return [script.title().lower() for script in scripts_list].index(name.lower())
@@ -17,7 +17,7 @@ def script_name_to_index(name, scripts_list):
# raise HTTPException(status_code=422, detail=f"Script '{name}' not found") from e
def get_selectable_script(script_name, script_runner):
if script_name is None or script_name == "":
if script_name is None or script_name == "" or script_name == 'none':
return None, None
script_idx = script_name_to_index(script_name, script_runner.selectable_scripts)
if script_idx is None:
@@ -40,7 +40,7 @@ def get_script_info(script_name: Optional[str] = None):
return res
def get_script(script_name, script_runner):
if script_name is None or script_name == "":
if script_name is None or script_name == "" or script_name == 'none':
return None, None
script_idx = script_name_to_index(script_name, script_runner.scripts)
if script_idx is None: