fix: timing flash + couleur idle LED + diagnostic auto-brightness
🚀 Deploy — JH Photomaton / 🔍 Vérification (push) Has been cancelled
🚀 Deploy — JH Photomaton / 🍓 Deploy sur le Pi (push) Has been cancelled

This commit is contained in:
2026-07-20 19:06:16 +02:00
parent f192ffc92f
commit 19557b20fb
10 changed files with 247 additions and 37 deletions
+18
View File
@@ -228,6 +228,24 @@ class ConfigService:
self._config.print.user_print_quota = quota
self._config.print.user_print_max_copies = max_copies
def save_printer_excluded(self, printer_name: str, excluded: bool):
"""Marque (ou démarque) une imprimante comme exclue du load-balancing."""
with open(self.path, encoding="utf-8") as f:
raw = yaml.safe_load(f) or {}
printers = raw.get("print", {}).get("printers", [])
for p in printers:
if isinstance(p, dict) and p.get("name") == printer_name:
p["excluded"] = excluded
break
raw.setdefault("print", {})["printers"] = printers
with open(self.path, "w", encoding="utf-8") as f:
yaml.dump(raw, f, allow_unicode=True, default_flow_style=False)
if self._config:
for p in self._config.print.printers:
if isinstance(p, dict) and p.get("name") == printer_name:
p["excluded"] = excluded
break
def save_print_mode(self, mode: str):
with open(self.path, encoding="utf-8") as f:
raw = yaml.safe_load(f) or {}