Add song progress bar
Deploy HEOS panel / deploy (push) Successful in 25s

This commit is contained in:
2026-09-16 15:03:45 +02:00
parent 58a2dedc03
commit 4dd7e298a5
5 changed files with 103 additions and 6 deletions
+7 -1
View File
@@ -453,7 +453,13 @@ class Controller:
# Kept while paused, so the card does not jump about
# under the thumb that just pressed pause.
if room["play_state"] != "stop":
room["now_playing"] = self._track(media)
track = self._track(media)
if track is not None:
progress = self.heos.progress_for(self.playback_pid(key))
if progress and progress["duration"]:
track["position_ms"] = progress["cur_pos"]
track["duration_ms"] = progress["duration"]
room["now_playing"] = track
except (TargetError, HeosError, KeyError) as exc:
room["available"] = False
room["error"] = str(exc)