diff --git a/server.py b/server.py index d252704..b8fe9d8 100644 --- a/server.py +++ b/server.py @@ -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: diff --git a/tests/test_protocol.py b/tests/test_protocol.py index 98d23d1..0eccefe 100644 --- a/tests/test_protocol.py +++ b/tests/test_protocol.py @@ -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():