Make progress bar cursor draggable
Deploy HEOS panel / deploy (push) Successful in 26s

This commit is contained in:
2026-09-16 23:19:08 +02:00
parent 51dff45b54
commit ec684b7803
12 changed files with 319 additions and 29 deletions
+5 -1
View File
@@ -55,6 +55,7 @@ class DemoController:
self._track = {"song": "Harvest Moon", "artist": "Neil Young", "image": None}
# Its play button only shows for a stream one of your accounts plays.
self._account = next(iter(cfg.SPOTIFY_ACCOUNTS), None)
self._film_ms = 241000 # where the pretend Zidoo's film is, so a seek sticks
# -- what the UI uses ---------------------------------------------
def state(self):
@@ -74,7 +75,7 @@ class DemoController:
# Standing in for a Zidoo plugged into this input, so the
# AVR card's now-playing block has something to show here too.
"now_playing": {"song": "Big Buck Bunny", "artist": "2008", "image": None,
"play_state": "play", "position_ms": 241000, "duration_ms": 596000}
"play_state": "play", "position_ms": self._film_ms, "duration_ms": 596000}
if self.avr.current_input()["code"] == self.cfg.ZIDOO_INPUT_CODE else None,
},
"heos_ok": True,
@@ -119,6 +120,9 @@ class DemoController:
self._joined = {k for k in self.cfg.ROOM_KEYS if k in joined}
return self.joined_keys()
def zidoo_seek(self, position_ms):
self._film_ms = min(596000, int(position_ms))
def joined_keys(self):
return [k for k in self.cfg.ROOM_KEYS if k in self._joined]