Fix AVR playing state
Deploy HEOS panel / deploy (push) Successful in 25s

This commit is contained in:
2026-09-16 20:39:53 +02:00
parent 532b48ad37
commit 51dff45b54
4 changed files with 16 additions and 9 deletions
+5 -2
View File
@@ -45,7 +45,9 @@ class ZidooClient:
instead. "image" is always None: the poster lives on the Zidoo, which
the phone cannot load over plain http, so "poster_id" names it
instead for app.py to serve. "position_ms" and "duration_ms" come
along whenever the length is known, as a room's do."""
along whenever the length is known, as a room's do. "play_state" is
"play" while the film runs (the video's "status" is 1), "pause"
otherwise."""
payload = self._get_json("ZidooVideoPlay/getPlayStatus")
if not payload or payload.get("status") != 200:
return None
@@ -56,7 +58,8 @@ class ZidooClient:
film = self._film(video.get("path"))
year = film.get("year")
track = {"song": title, "artist": str(year) if year else None, "image": None,
"poster_id": film.get("id")}
"poster_id": film.get("id"),
"play_state": "play" if video.get("status") == 1 else "pause"}
if video.get("duration"):
track["position_ms"] = video.get("currentPosition") or 0
track["duration_ms"] = video["duration"]