Add spotify queue
Deploy HEOS panel / deploy (push) Successful in 30s

This commit is contained in:
franzz committed 2026-10-20 15:44:56 +02:00
1 parent 6c76121863
commit 6bee9bd9a3
13 files changed
+230 -5

No files matched your search

+10
View File
@@ -140,6 +140,16 @@ class DemoController:
def zidoo_seek(self, position_ms):
self._film_ms = min(596000, int(position_ms))
def spotify_queue(self, key):
"""What the demo's Spotify room plays next -- app.py's /api/spotify/queue."""
if not self._spotify.get(key):
raise ValueError("Only a Spotify stream one of your accounts is playing has a queue to show")
songs = ["Unknown Legend", "Old King", "Natural Beauty", "From Hank to Hendrix",
"You and Me", "War of Man", "One of These Days", "Such a Woman",
"Dreamin' Man", "Little Bit of Love", "Heart of Gold", "Old Man"]
return [{"song": song, "artist": "Neil Young", "image": None, "duration_ms": 240000}
for song in songs]
def joined_keys(self):
return [k for k in self.cfg.GUEST_ROOMS if k in self._joined]