Update webview paths and startup parameters

This commit is contained in:
2026-05-14 10:40:29 +02:00
parent 7468fce40f
commit 91fce08509

View File

@@ -1157,7 +1157,7 @@ Do NOT mention the object itself. Describe the environment in a concise way, e.g
def get_image_json(self, filepath: str):
# filepath kommt aus JS als "output/flower-1.png"
full_path = os.path.join(BASE_DIR, "web", filepath)
full_path = os.path.join(WEB_DIR, filepath)
try:
# Always prefer the sidecar if available (contains most up-to-date data)
sidecar = full_path + ".json"
@@ -1219,7 +1219,7 @@ if __name__ == "__main__":
api = Api()
window = webview.create_window(
"SD 3D Model Image Gen",
"web/index.html",
WEB_INDEX,
js_api=api,
width=900,
height=1000,
@@ -1227,4 +1227,4 @@ if __name__ == "__main__":
resizable=True
)
api.set_window(window)
webview.start(debug=True)
webview.start(debug=not IS_FROZEN, icon=APP_ICON_PATH if os.path.isfile(APP_ICON_PATH) else None)