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