2.6.1: las actualizaciones automáticas, apagadas por defecto
El programa no sale a la red al arrancar salvo que alguien encienda el interruptor en Ajustes. Hasta la 2.6.0 el actualizador escribía «auto: true» él solo en config.json sin que nadie lo eligiera: al arrancar se apaga; lo que se encienda desde Ajustes queda marcado como elegido y se respeta. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Este commit está contenido en:
@@ -37,7 +37,7 @@ import actualizador
|
||||
asistente.O = sys.modules[__name__]
|
||||
actualizador.O = sys.modules[__name__]
|
||||
|
||||
VERSION = "2.6.0"
|
||||
VERSION = "2.6.1"
|
||||
|
||||
CONGELADO = getattr(sys, "frozen", False)
|
||||
SIN_VENTANA = getattr(subprocess, "CREATE_NO_WINDOW", 0) # ffmpeg/ffprobe/net sin abrir consolas negras # empaquetado como .exe con PyInstaller
|
||||
@@ -251,6 +251,11 @@ for k, v in R.DICCIONARIO_SEMILLA.items(): # palabras nuevas de la semilla, si
|
||||
DICC["carpetas"].setdefault(k, v)
|
||||
guardar_json(DICC_PATH, DICC)
|
||||
|
||||
_act = CONFIG.get("actualizaciones")
|
||||
if isinstance(_act, dict) and _act.get("auto") is True and not _act.get("elegido"):
|
||||
_act["auto"] = False
|
||||
guardar_json(CONFIG_PATH, CONFIG)
|
||||
|
||||
PLANTILLAS = cargar_json(PLANTILLAS_PATH, R.PLANTILLAS)
|
||||
for t, d in R.PLANTILLAS.items():
|
||||
PLANTILLAS.setdefault(t, d)
|
||||
@@ -3942,6 +3947,8 @@ class Manejador(BaseHTTPRequestHandler):
|
||||
for k, v in d.items():
|
||||
if k in permitidas and isinstance(v, dict):
|
||||
CONFIG.setdefault(k, {}).update({kk: vv for kk, vv in v.items() if kk in permitidas[k]})
|
||||
if isinstance(d.get("actualizaciones"), dict) and "auto" in d["actualizaciones"]:
|
||||
CONFIG["actualizaciones"]["elegido"] = True # lo decidió una persona, no un valor por defecto
|
||||
guardar_json(CONFIG_PATH, CONFIG)
|
||||
return self._json({"ok": True, "config": CONFIG})
|
||||
if ruta == "/api/diccionario":
|
||||
@@ -4417,7 +4424,7 @@ def main():
|
||||
url = f"http://127.0.0.1:{PUERTO}/"
|
||||
if sys.stdout:
|
||||
print(f"OrganiLAB {VERSION} en {url} (Ctrl+C para cerrar)")
|
||||
if CONGELADO and CONFIG.get("actualizaciones", {}).get("auto", True):
|
||||
if CONGELADO and CONFIG.get("actualizaciones", {}).get("auto") is True:
|
||||
actualizador.comprobar_en_segundo_plano()
|
||||
if "--sin-navegador" in sys.argv: # solo el servidor (desarrollo / vista previa)
|
||||
try:
|
||||
|
||||
Referencia en una nueva incidencia
Block a user