This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user