DJ Brake: learned limiter levels survive a restart

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
GivouandClaude Opus 5.5 committed 2026-11-02 21:10:04 +01:00
1 parent cf35a1faa1
commit 6d53069380
2 files changed
+6 -1

No files matched your search

+1 -1
View File
@@ -472,7 +472,7 @@ class App:
sessions = {k: v for k, v in self.sessions.items() if k not in self.app_sessions}
cfg = {"devices": [d.config() for d in self.real_devices()], "auth": self.auth,
"sessions": sessions, "limiter": self.limiter, "remote": self.remote, "locked": self.locked, "lock_dash": self.lock_dash,
"soundfield": self.soundfield, "logo": self.logo, "dashboard": self.dashboard, "djbrake": self.djbrake, "dj_ignore": self.dj_ignore, "dj_hint": self.dj_hint, "dj_hint_en": self.dj_hint_en, "dj_margin": self.dj_margin,
"soundfield": self.soundfield, "logo": self.logo, "dashboard": self.dashboard, "djbrake": self.djbrake, "dj_ignore": self.dj_ignore, "dj_hint": self.dj_hint, "dj_hint_en": self.dj_hint_en, "dj_margin": self.dj_margin, "dj_cal": self.dj_cal,
"mute_all": {"active": self.mute_all["active"],
"restore": {k: v for k, v in self.mute_all["restore"].items() if k != "demo"}}}
if self.lang:
+5
View File
@@ -234,6 +234,11 @@ def test_dj_brake_follows_music():
app.dj_ignore = {"x": [0]}
note(-1, 160.0, True)
assert app.dj_hit == 110.0 and app.dj_rooms["x"] is False
# what was learned survives a restart
app.save()
again = server.App(Path(d) / "c.json")
again.load()
assert abs(again.dj_cal["x:0"] - app.dj_cal["x:0"]) < 0.01
def test_looks_follow_presets():