This commit is contained in:
1 parent
053be20b9c
commit
5ca504c680
10 files changed
+885
-21
No files matched your search
@@ -42,6 +42,11 @@ class _FakeAvr:
|
||||
|
||||
|
||||
class DemoController:
|
||||
# app.py checks this before anything that would touch real hardware
|
||||
# over the network -- the speakers this stands in for may be switched
|
||||
# on in the next room.
|
||||
demo = True
|
||||
|
||||
def __init__(self, cfg):
|
||||
self.cfg = cfg
|
||||
self.avr = _FakeAvr()
|
||||
@@ -150,8 +155,15 @@ class DemoController:
|
||||
return [{"name": s["name"], "input_id": s["code"]} for s in self.avr.inputs()]
|
||||
|
||||
def play_heos_input(self, key, input_id, source_key=None):
|
||||
# A room put on one of its own inputs is off Spotify, which is how
|
||||
# the panel lets go of a room -- see app.py's _spotify_release.
|
||||
if key in self._spotify:
|
||||
self._spotify[key] = False
|
||||
return None
|
||||
|
||||
def on_spotify(self, key):
|
||||
return self._spotify.get(key, False)
|
||||
|
||||
# -- the AVR: app.py calls these directly, same as the real Controller
|
||||
def avr_inputs(self):
|
||||
return self.avr.inputs()
|
||||
|
||||
Reference in new issue
Block a user