Tune key at every location: the key the tracks send must reach each location's FOH (SuperRack) in that location's own Planning Center key

NA works out each location's expected Waves Tune programs (campus_tune) and serves them at /api/tune/<id>; locations
fetch their list, read ProPresenter through Companion's connection, and compare with a MIDI witness on the FOH Mac
(SC FOH now; WS FOH needs the Command Line Tools first). FOH KEY WRONG / FOH GOT NO KEY.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 11:51:09 -04:00
co-authored by Claude Opus 5.5
parent 5d0263a9b9
commit e4a33ff660
9 changed files with 140 additions and 11 deletions
+15
View File
@@ -143,6 +143,21 @@ class TestServer(unittest.TestCase):
self.assertIn(("rosstalk", "h:prop", "h:ingest", "ok"), edges) # ProPresenter's cues into Companion
self.assertEqual({t["id"] for t in w["types"]} >= {"companion", "midi", "watch", "dante"}, True)
def test_the_hub_hands_each_location_its_tune_keys(self):
path = os.path.join(self.data, "snapshot.json")
old = open(path).read()
snap = json.loads(old)
snap["tune_expect"] = {"SC": {"owe you praise": {"title": "Owe You Praise", "key": "Eb", "clips": ["Ebmaj"], "programs": [7]}}}
try:
with open(path, "w") as f:
json.dump(snap, f)
st, body = get(self.port, "/api/tune/sc")
self.assertEqual((st, json.loads(body)["songs"]["owe you praise"]["programs"]), (200, [7]))
self.assertEqual(get(self.port, "/api/tune/ws")[0], 404) # no list for WS yet
finally:
with open(path, "w") as f:
f.write(old)
def test_gear_and_keys_and_pages(self):
gear = json.loads(get(self.port, "/api/gear")[1])
self.assertTrue(any(r["name"] == "HyperDeck_2" and "hd2" in r["watched_by"] for r in gear))